[Basic Tutorial 2] texture problem (mipmaps?) [solved]

Problems building or running the engine, queries about how to use features etc.
Post Reply
Lafazar
Gnoblar
Posts: 5
Joined: Thu Aug 28, 2008 3:31 pm

[Basic Tutorial 2] texture problem (mipmaps?) [solved]

Post by Lafazar »

I am trying to run basic tutorial 2 after finishing basic tutorial 1. Everything works fine, but distant textures on the ninja are replaced with the textures from the robot used in tutorial 1. When I get closer they are replaced with the ninja textures. This does not happen, when I run tutorial 2 first after booting the computer.

It seems the mipmaps are not generated correctly (even though the log claims they are). Is this a bug in the code or could it be a problem with my graphics card driver?

I am using OGRE 1.4.9 & MinGW C++ Toolbox with code::blocks on an ASUS EEE 900 (yes, integrated graphics, don't laugh)

Image
Image

main.cpp:

Code: Select all

#include "ExampleApplication.h"

class TutorialApplication : public ExampleApplication
{
protected:
public:
    TutorialApplication()
    {
    }

    ~TutorialApplication()
    {
    }
protected:
    virtual void createCamera(void)
    {
        // create the camera
        mCamera = mSceneMgr->createCamera("PlayerCam");
        // set its position, direction
        mCamera->setPosition(Vector3(0,10,500));
        mCamera->lookAt(Vector3(0,0,0));
        mCamera->setNearClipDistance(5);

    }

    virtual void createViewports(void)
    {
        // Create one viewport, entire window
        Viewport* vp = mWindow->addViewport(mCamera);
        vp->setBackgroundColour(ColourValue(0,0,0));
        // Alter the camera aspect ratio to match the viewport
        mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight()));
    }

    void createScene(void)
    {
        mSceneMgr->setAmbientLight(ColourValue(0, 0, 0));
        mSceneMgr->setShadowTechnique(SHADOWTYPE_STENCIL_ADDITIVE);

        Entity *ent = mSceneMgr->createEntity("Ninja", "ninja.mesh");
        ent->setCastShadows(true);
        mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent);

        Plane plane(Vector3::UNIT_Y, 0);
        MeshManager::getSingleton().createPlane("ground",
            ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, plane,
            1500,1500,20,20,true,1,5,5,Vector3::UNIT_Z);
        ent = mSceneMgr->createEntity("GroundEntity", "ground");
        mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent);
        ent->setMaterialName("Examples/Rockwall");
        ent->setCastShadows(false);

        Light *light = mSceneMgr->createLight("Light1");
        light->setType(Light::LT_POINT);
        light->setPosition(Vector3(0, 150, 250));
        light->setDiffuseColour(1.0, 0.0, 0.0);
        light->setSpecularColour(1.0, 0.0, 0.0);

        light = mSceneMgr->createLight("Light3");
        light->setType(Light::LT_DIRECTIONAL);
        light->setDiffuseColour(ColourValue(.25, .25, 0));
        light->setSpecularColour(ColourValue(.25, .25, 0));
        light->setDirection(Vector3( 0, -1, 1 ));

        light = mSceneMgr->createLight("Light2");
        light->setType(Light::LT_SPOTLIGHT);
        light->setDiffuseColour(0, 0, 1.0);
        light->setSpecularColour(0, 0, 1.0);

        light->setDirection(-1, -1, 0);
        light->setPosition(Vector3(300, 300, 0));
        light->setSpotlightRange(Degree(35), Degree(50));



    }
};

#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"

INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char **argv)
#endif
{
    // Create application object
    TutorialApplication app;

    try {
        app.go();
    } catch( Exception& e ) {
#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
        MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
        fprintf(stderr, "An exception has occurred: %s\n",
                e.getFullDescription().c_str());
#endif
    }

    return 0;
}
ogre.log:

Code: Select all

16:44:47: Creating resource group General
16:44:47: Creating resource group Internal
16:44:47: Creating resource group Autodetect
16:44:47: SceneManagerFactory for type 'DefaultSceneManager' registered.
16:44:47: Registering ResourceManager for type Material
16:44:47: Registering ResourceManager for type Mesh
16:44:47: Registering ResourceManager for type Skeleton
16:44:47: MovableObjectFactory for type 'ParticleSystem' registered.
16:44:47: OverlayElementFactory for type Panel registered.
16:44:47: OverlayElementFactory for type BorderPanel registered.
16:44:47: OverlayElementFactory for type TextArea registered.
16:44:47: Registering ResourceManager for type Font
16:44:47: ArchiveFactory for archive type FileSystem registered.
16:44:47: ArchiveFactory for archive type Zip registered.
16:44:47: FreeImage version: 3.9.3
16:44:47: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
16:44:47: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi
16:44:47: DDS codec registering
16:44:47: Registering ResourceManager for type HighLevelGpuProgram
16:44:47: Registering ResourceManager for type Compositor
16:44:47: MovableObjectFactory for type 'Entity' registered.
16:44:47: MovableObjectFactory for type 'Light' registered.
16:44:47: MovableObjectFactory for type 'BillboardSet' registered.
16:44:47: MovableObjectFactory for type 'ManualObject' registered.
16:44:47: MovableObjectFactory for type 'BillboardChain' registered.
16:44:47: MovableObjectFactory for type 'RibbonTrail' registered.
16:44:47: Loading library .\RenderSystem_Direct3D9
16:44:47: Installing plugin: D3D9 RenderSystem
16:44:47: D3D9 : Direct3D9 Rendering Subsystem created.
16:44:47: D3D9: Driver Detection Starts
16:44:47: D3D9: Driver Detection Ends
16:44:47: Plugin successfully installed
16:44:47: Loading library .\RenderSystem_GL
16:44:47: Installing plugin: GL RenderSystem
16:44:47: OpenGL Rendering Subsystem created.
16:44:47: Plugin successfully installed
16:44:47: Loading library .\Plugin_ParticleFX
16:44:47: Installing plugin: ParticleFX
16:44:47: Particle Emitter Type 'Point' registered
16:44:47: Particle Emitter Type 'Box' registered
16:44:47: Particle Emitter Type 'Ellipsoid' registered
16:44:47: Particle Emitter Type 'Cylinder' registered
16:44:47: Particle Emitter Type 'Ring' registered
16:44:47: Particle Emitter Type 'HollowEllipsoid' registered
16:44:47: Particle Affector Type 'LinearForce' registered
16:44:47: Particle Affector Type 'ColourFader' registered
16:44:47: Particle Affector Type 'ColourFader2' registered
16:44:47: Particle Affector Type 'ColourImage' registered
16:44:47: Particle Affector Type 'ColourInterpolator' registered
16:44:47: Particle Affector Type 'Scaler' registered
16:44:47: Particle Affector Type 'Rotator' registered
16:44:47: Particle Affector Type 'DirectionRandomiser' registered
16:44:47: Particle Affector Type 'DeflectorPlane' registered
16:44:47: Plugin successfully installed
16:44:47: Loading library .\Plugin_BSPSceneManager
16:44:47: Installing plugin: BSP Scene Manager
16:44:47: Plugin successfully installed
16:44:47: Loading library .\Plugin_OctreeSceneManager
16:44:47: Installing plugin: Octree & Terrain Scene Manager
16:44:47: Plugin successfully installed
16:44:47: Loading library .\Plugin_CgProgramManager
16:44:47: Installing plugin: Cg Program Manager
16:44:48: Plugin successfully installed
16:44:48: *-*-* OGRE Initialising
16:44:48: *-*-* Version 1.4.9 (Eihort)
16:44:48: Creating resource group Bootstrap
16:44:48: Added resource location '../../media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
16:44:48: Added resource location '../../media' of type 'FileSystem' to resource group 'General'
16:44:48: Added resource location '../../media/fonts' of type 'FileSystem' to resource group 'General'
16:44:48: Added resource location '../../media/materials/programs' of type 'FileSystem' to resource group 'General'
16:44:48: Added resource location '../../media/materials/scripts' of type 'FileSystem' to resource group 'General'
16:44:48: Added resource location '../../media/materials/textures' of type 'FileSystem' to resource group 'General'
16:44:48: Added resource location '../../media/models' of type 'FileSystem' to resource group 'General'
16:44:48: Added resource location '../../media/overlays' of type 'FileSystem' to resource group 'General'
16:44:48: Added resource location '../../media/particle' of type 'FileSystem' to resource group 'General'
16:44:48: Added resource location '../../media/gui' of type 'FileSystem' to resource group 'General'
16:44:48: Added resource location '../../media/DeferredShadingMedia' of type 'FileSystem' to resource group 'General'
16:44:48: Added resource location '../../media/packs/cubemap.zip' of type 'Zip' to resource group 'General'
16:44:48: Added resource location '../../media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
16:44:48: Added resource location '../../media/packs/dragon.zip' of type 'Zip' to resource group 'General'
16:44:48: Added resource location '../../media/packs/fresneldemo.zip' of type 'Zip' to resource group 'General'
16:44:48: Added resource location '../../media/packs/ogretestmap.zip' of type 'Zip' to resource group 'General'
16:44:48: Added resource location '../../media/packs/skybox.zip' of type 'Zip' to resource group 'General'
16:44:48: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
16:44:48: D3D9 : RenderSystem Option: Anti aliasing = None
16:44:48: D3D9 : RenderSystem Option: Floating-point mode = Fastest
16:44:48: D3D9 : RenderSystem Option: Full Screen = No
16:44:48: D3D9 : RenderSystem Option: Rendering Device = Mobile Intel(R) 915GM/GMS,910GML Express Chipset Family
16:44:48: D3D9 : RenderSystem Option: VSync = No
16:44:48: D3D9 : RenderSystem Option: Video Mode = 640 x 480 @ 32-bit colour
16:44:49: CPU Identifier & Features
16:44:49: -------------------------
16:44:49:  *   CPU ID: GenuineIntel: Intel(R) Celeron(R) M processor          900MHz
16:44:49:  *      SSE: yes
16:44:49:  *     SSE2: yes
16:44:49:  *     SSE3: no
16:44:49:  *      MMX: yes
16:44:49:  *   MMXEXT: yes
16:44:49:  *    3DNOW: no
16:44:49:  * 3DNOWEXT: no
16:44:49:  *     CMOV: yes
16:44:49:  *      TSC: yes
16:44:49:  *      FPU: yes
16:44:49:  *      PRO: no
16:44:49:  *       HT: no
16:44:49: -------------------------
16:44:49: *** Starting Win32GL Subsystem ***
16:44:49: GLRenderSystem::createRenderWindow "OGRE Render Window", 640x480 windowed  miscParams: FSAA=0 colourDepth=32 displayFrequency=0 vsync=false 
16:44:49: Created Win32Window 'OGRE Render Window' : 640x480, 32bpp
16:44:49: GL_VERSION = 1.4.0 - Build 7.14.10.4704
16:44:49: GL_VENDOR = Intel
16:44:49: GL_RENDERER = Intel 915GM
16:44:49: GL_EXTENSIONS = GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_multitexture GL_ARB_point_parameters GL_ARB_shadow GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_window_pos GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_cull_vertex GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture_compression_s3tc GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_filter_anisotropic GL_EXT_texture3D GL_3DFX_texture_compression_FXT1 GL_IBM_texture_mirrored_repeat GL_NV_blend_square GL_NV_texgen_reflection GL_SGIS_generate_mipmap GL_WIN_swap_hint 
16:44:49: Supported WGL extensions: WGL_ARB_buffer_region WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_pixel_format WGL_ARB_pbuffer WGL_EXT_swap_control 
16:44:49: ***************************
16:44:49: *** GL Renderer Started ***
16:44:49: ***************************
16:44:49: Registering ResourceManager for type GpuProgram
16:44:49: GL: Using PBuffers for rendering to textures
16:44:49: RenderSystem capabilities
16:44:49: -------------------------
16:44:49:  * Hardware generation of mipmaps: yes
16:44:49:  * Texture blending: yes
16:44:49:  * Anisotropic texture filtering: yes
16:44:49:  * Dot product texture operation: yes
16:44:49:  * Cube mapping: yes
16:44:49:  * Hardware stencil buffer: yes
16:44:49:    - Stencil depth: 8
16:44:49:    - Two sided stencil support: yes
16:44:49:    - Wrap stencil values: yes
16:44:49:  * Hardware vertex / index buffers: yes
16:44:49:  * Vertex programs: yes
16:44:49:    - Max vertex program version: arbvp1
16:44:49:  * Fragment programs: yes
16:44:49:    - Max fragment program version: arbfp1
16:44:49:  * Texture Compression: yes
16:44:49:    - DXT: yes
16:44:49:    - VTC: no
16:44:49:  * Scissor Rectangle: yes
16:44:49:  * Hardware Occlusion Query: no
16:44:49:  * User clip planes: yes
16:44:49:  * VET_UBYTE4 vertex element type: yes
16:44:49:  * Infinite far plane projection: yes
16:44:49:  * Hardware render-to-texture: yes
16:44:49:  * Floating point textures: no
16:44:49:  * Non-power-of-two textures: no
16:44:49:  * Volume textures: yes
16:44:49:  * Multiple Render Targets: 1
16:44:49:  * Point Sprites: no
16:44:49:  * Extended point parameters: yes
16:44:49:  * Max Point Size: 256
16:44:49:  * Vertex texture fetch: yes
16:44:49:    - Max vertex textures: 16888
16:44:49:    - Vertex textures shared: yes
16:44:49: Registering ResourceManager for type Texture
16:44:49: ResourceBackgroundQueue - threading disabled
16:44:49: Particle Renderer Type 'billboard' registered
16:44:49: SceneManagerFactory for type 'BspSceneManager' registered.
16:44:49: Registering ResourceManager for type BspLevel
16:44:49: SceneManagerFactory for type 'OctreeSceneManager' registered.
16:44:49: SceneManagerFactory for type 'TerrainSceneManager' registered.
16:44:49: Creating viewport on target 'OGRE Render Window', rendering from camera 'PlayerCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
16:44:49: Parsing scripts for resource group Autodetect
16:44:49: Finished parsing scripts for resource group Autodetect
16:44:49: Parsing scripts for resource group Bootstrap
16:44:49: Parsing script OgreCore.material
16:44:49: Parsing script OgreProfiler.material
16:44:49: Parsing script Ogre.fontdef
16:44:49: Parsing script OgreDebugPanel.overlay
16:44:49: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
16:44:49: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8R8G8B8,256x256x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
16:44:49: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
16:44:49: Font BlueHighwayusing texture size 512x512
16:44:49: Info: Freetype returned null for character 127 in font BlueHighway
16:44:49: Info: Freetype returned null for character 128 in font BlueHighway
16:44:49: Info: Freetype returned null for character 129 in font BlueHighway
16:44:49: Info: Freetype returned null for character 130 in font BlueHighway
16:44:49: Info: Freetype returned null for character 131 in font BlueHighway
16:44:49: Info: Freetype returned null for character 132 in font BlueHighway
16:44:49: Info: Freetype returned null for character 133 in font BlueHighway
16:44:49: Info: Freetype returned null for character 134 in font BlueHighway
16:44:49: Info: Freetype returned null for character 135 in font BlueHighway
16:44:49: Info: Freetype returned null for character 136 in font BlueHighway
16:44:49: Info: Freetype returned null for character 137 in font BlueHighway
16:44:49: Info: Freetype returned null for character 138 in font BlueHighway
16:44:49: Info: Freetype returned null for character 139 in font BlueHighway
16:44:49: Info: Freetype returned null for character 140 in font BlueHighway

16:44:49: Info: Freetype returned null for character 141 in font BlueHighway
16:44:49: Info: Freetype returned null for character 142 in font BlueHighway
16:44:49: Info: Freetype returned null for character 143 in font BlueHighway
16:44:49: Info: Freetype returned null for character 144 in font BlueHighway
16:44:49: Info: Freetype returned null for character 145 in font BlueHighway
16:44:49: Info: Freetype returned null for character 146 in font BlueHighway
16:44:49: Info: Freetype returned null for character 147 in font BlueHighway
16:44:49: Info: Freetype returned null for character 148 in font BlueHighway
16:44:49: Info: Freetype returned null for character 149 in font BlueHighway
16:44:49: Info: Freetype returned null for character 150 in font BlueHighway
16:44:49: Info: Freetype returned null for character 151 in font BlueHighway
16:44:49: Info: Freetype returned null for character 152 in font BlueHighway
16:44:49: Info: Freetype returned null for character 153 in font BlueHighway
16:44:49: Info: Freetype returned null for character 154 in font BlueHighway
16:44:49: Info: Freetype returned null for character 155 in font BlueHighway
16:44:49: Info: Freetype returned null for character 156 in font BlueHighway
16:44:49: Info: Freetype returned null for character 157 in font BlueHighway
16:44:49: Info: Freetype returned null for character 158 in font BlueHighway
16:44:49: Info: Freetype returned null for character 159 in font BlueHighway
16:44:49: Info: Freetype returned null for character 160 in font BlueHighway
16:44:49: Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with  hardware generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
16:44:49: Texture: ogretext.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
16:44:49: Parsing script OgreLoadingPanel.overlay
16:44:49: Finished parsing scripts for resource group Bootstrap
16:44:49: Parsing scripts for resource group General
16:44:49: Parsing script Examples.program
16:44:49: Parsing script StdQuad_vp.program
16:44:49: Parsing script deferred.glsl.program
16:44:49: Parsing script deferred.hlsl.program
16:44:49: Parsing script deferred_post_debug.glsl.program
16:44:49: Parsing script deferred_post_debug.hlsl.program
16:44:49: Parsing script deferred_post_minilight.glsl.program
16:44:49: Parsing script deferred_post_minilight.hlsl.program
16:44:49: Parsing script deferred_post_multipass.glsl.program
16:44:49: Parsing script deferred_post_multipass.hlsl.program
16:44:49: Parsing script deferred_post_onepass.glsl.program
16:44:49: Parsing script deferred_post_onepass.hlsl.program
16:44:49: Parsing script BlackAndWhite.material
16:44:49: Parsing script Bloom.material
16:44:49: Parsing script DOF.material
16:44:49: Parsing script DepthShadowmap.material
16:44:49: Parsing script Embossed.material
16:44:49: Parsing script Example-DynTex.material
16:44:49: Parsing script Example-Water.material
16:44:49: Parsing script Example.material
16:44:50: Parsing script Examples-Advanced.material
16:44:50: Parsing script Glass.material
16:44:50: Parsing script HeatVision.material
16:44:50: Parsing script Hurt.material
16:44:50: Parsing script Invert.material
16:44:50: Parsing script Laplace.material
16:44:50: Parsing script MotionBlur.material
16:44:50: Parsing script Ocean.material
16:44:50: Parsing script OffsetMapping.material
16:44:50: Parsing script Ogre.material
16:44:50: Parsing script OldMovie.material
16:44:50: Parsing script OldTV.material
16:44:50: Parsing script Posterize.material
16:44:50: Parsing script RZR-002.material
16:44:50: Parsing script SharpenEdges.material
16:44:50: Parsing script Tiling.material
16:44:50: Parsing script VarianceShadowmap.material
16:44:50: Parsing script facial.material
16:44:50: Parsing script hdr.material
16:44:50: Parsing script instancing.material
16:44:50: Parsing script smoke.material
16:44:50: Parsing script deferred.material
16:44:50: Parsing script deferred_post_debug.material
16:44:50: Parsing script deferred_post_minilight.material
16:44:50: Parsing script deferred_post_multipass.material
16:44:50: Parsing script deferred_post_onepass.material
16:44:50: Parsing script deferreddemo.material
16:44:50: Parsing script RomanBath.material
16:44:50: Parsing script Examples.compositor
16:44:50: Parsing script sample.fontdef
16:44:50: Parsing script Example-Water.particle
16:44:50: Parsing script Example.particle
16:44:50: Parsing script emitted_emitter.particle
16:44:50: Parsing script smoke.particle
16:44:50: Parsing script Compositor.overlay
16:44:50: Parsing script DP3.overlay
16:44:50: Parsing script Example-CubeMapping.overlay
16:44:50: Parsing script Example-DynTex.overlay
16:44:50: Parsing script Example-Water.overlay
16:44:50: Parsing script Shadows.overlay
16:44:50: Finished parsing scripts for resource group General
16:44:50: Parsing scripts for resource group Internal
16:44:50: Finished parsing scripts for resource group Internal
16:44:50: Mesh: Loading ninja.mesh.
16:44:50: Skeleton: Loading ninja.skeleton
16:44:50: Texture: nskingr.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 5 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
16:44:50: Texture: rockwall.tga: Loading 1 faces(PF_R8G8B8,256x256x1) with 5 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
16:44:50: *** Initializing OIS ***
16:44:50: Texture: spot_shadow_fade.png: Loading 1 faces(PF_R8G8B8,128x128x1) with 5 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
16:44:53: Unregistering ResourceManager for type BspLevel
16:44:53: *-*-* OGRE Shutdown
16:44:53: Unregistering ResourceManager for type Compositor
16:44:53: Unregistering ResourceManager for type Font
16:44:53: Unregistering ResourceManager for type Skeleton
16:44:53: Unregistering ResourceManager for type Mesh
16:44:53: Unregistering ResourceManager for type HighLevelGpuProgram
16:44:53: Uninstalling plugin: Cg Program Manager
16:44:53: Plugin successfully uninstalled
16:44:53: Unloading library .\Plugin_CgProgramManager
16:44:53: Uninstalling plugin: Octree & Terrain Scene Manager
16:44:53: Plugin successfully uninstalled
16:44:53: Unloading library .\Plugin_OctreeSceneManager
16:44:53: Uninstalling plugin: BSP Scene Manager
16:44:53: Plugin successfully uninstalled
16:44:53: Unloading library .\Plugin_BSPSceneManager
16:44:53: Uninstalling plugin: ParticleFX
16:44:53: Plugin successfully uninstalled
16:44:53: Unloading library .\Plugin_ParticleFX
16:44:53: Uninstalling plugin: GL RenderSystem
16:44:53: Render Target 'OGRE Render Window' Average FPS: 26.1345 Best FPS: 27.3438 Worst FPS: 24.9252
16:44:53: Unregistering ResourceManager for type GpuProgram
16:44:53: *** Stopping Win32GL Subsystem ***
16:44:53: Unregistering ResourceManager for type Texture
16:44:53: Plugin successfully uninstalled
16:44:53: Unloading library .\RenderSystem_GL
16:44:53: Uninstalling plugin: D3D9 RenderSystem
16:44:53: D3D9 : Shutting down cleanly.
16:44:53: D3D9 : Direct3D9 Rendering Subsystem destroyed.
16:44:53: Plugin successfully uninstalled
16:44:53: Unloading library .\RenderSystem_Direct3D9
16:44:53: Unregistering ResourceManager for type Material
Last edited by Lafazar on Sat Aug 30, 2008 10:23 am, edited 1 time in total.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Post by nullsquared »

There's a sticky in the General Discussion forum about it: http://www.ogre3d.org/phpBB2/viewtopic.php?t=41547
Lafazar
Gnoblar
Posts: 5
Joined: Thu Aug 28, 2008 3:31 pm

Post by Lafazar »

Thank you very much for your answer. I read the thread you linked, but it seems to only concern Nvidia drivers. I have Intel integrated graphics (Intel 915GM). But I guess there could be a similar error in those drivers.

However, there is one strange thing I found: This problem ONLY happens with basic tutorial 2. I compiled ALL of the demos that came with the SDK and they all run perfectly fine (except those using features my card doesn't support of course), without any mipmap corruption at all.

It seems to be a specific problem with this tutorial, or at least the ninja mesh used. Replacing the Ninja mesh with something else fixes the problem, but the problem also appears when loading any of the following meshes in tutorial 2:
jaiqua.mesh
ninja.mesh
razor.mesh
RZR-002.mesh

All these meshes can also be loaded in the Ocean demo and razor.mesh appears in the SkyBox demo. I do not experience any mipmap corruption at all in these demos.
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 51

Post by madmarx »

I do not have the reason, but you if you want to suppress this problem, you can suppress mipmap in your app.

Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(0);

(I am not sure, but I think it's to be done in ExampleApplication before loading the ressources, anyway you can try it after -that is to say in your scene creation-).

good luck!
Lafazar
Gnoblar
Posts: 5
Joined: Thu Aug 28, 2008 3:31 pm

Post by Lafazar »

Thanks, it does indeed suppress the problem. But I would still like to find out what causes it. It's just strange that it only happens in this tutorial and not in any of the demos that use the same models.

Edit: It is a driver problem. Forcing texture compression in the driver settings fixes the problem. I guess the demo applications force texture compression too.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Lafazar wrote:Edit: It is a driver problem. Forcing texture compression in the driver settings fixes the problem. I guess the demo applications force texture compression too.
No, we don't. If there's something you did which helps these chipsets (I don't have a test machine with this particular card), please submit a patch.
Lafazar
Gnoblar
Posts: 5
Joined: Thu Aug 28, 2008 3:31 pm

Post by Lafazar »

sinbad wrote:No, we don't. If there's something you did which helps these chipsets (I don't have a test machine with this particular card), please submit a patch.
I'm sorry, patching this in OGRE exceeds my abilities, I'm just starting to learn OGRE. All I can do for now is forcing texture compression in the OpenGL settings of the Intel Driver:

Image

However, from my limited understanding, it seems to be similar bug with uncompressed textures as the one in the Nvidia drivers, so the same patch with GL_VENDOR = Intel might fix it.

Just for clarification, are the textures for these models loaded as uncompressed by default (exampleApplication.h is responsible for preloading if I understand correctly) or is there something else they have in common? Because mipmap corruption only happens when loading these specific models in basic tutorial 2 (another observation: it also causes the ground textures mipmaps to be corrupted which loads fine on its own):
jaiqua.mesh
ninja.mesh
razor.mesh
RZR-002.mesh
Post Reply