TextureManager instantiation order, render system dependent

Minor issues with the Ogre API that can be trivial to fix
Post Reply
User avatar
jason86
Silver Sponsor
Silver Sponsor
Posts: 22
Joined: Sat Dec 17, 2005 6:40 am
Location: Austin, Tx

TextureManager instantiation order, render system dependent

Post by jason86 »

I searched for this and it was an issue in the past (2006 heh), but I definitely think it qualifies as a paper cut because of the following:

This will always work (assuming code before/after obviously):

Code: Select all

OgreRoot::getSingleton().initialise(true);
Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
However, this will crash in the OpenGL renderer and not Direct3d 9:

Code: Select all

OgreRoot::getSingleton().initialise(false); // only difference
Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
This is due to the Direct3d 9 renderer instantiating the TextureManager in its _initialise() call, whereas OpenGl does it in _createWindow; the API should have similar behavior between rendersystems IMO.

Old issue (irrelevant imo)
http://www.ogre3d.org/forums/viewtopic.php?f=4&t=24100
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: TextureManager instantiation order, render system depend

Post by masterfalcon »

Fixing in GL/GLES/GLES2 for 1.8. Good point and thanks!
Post Reply