If you want to create a texture, you may want to call an
imaginable method IDriver::createTexture. You call
ITexture* texture = driver->createTexture(dimension2d<u32>(128, 128));
If you no longer need the texture, call texture->drop().
If you want to load a texture, you may want to call imaginable
method IDriver::loadTexture. You do this like
ITexture* texture = driver->loadTexture("example.jpg");
You will not have to drop the pointer to the loaded texture,
because the name of the method does not start with 'create'.
The texture is stored somewhere by the driver.
\return True, if the object was deleted. */
bool drop() const
{
// someone is doing bad reference counting.
_IRR_DEBUG_BREAK_IF(ReferenceCounter <= 0)
--ReferenceCounter;
if (!ReferenceCounter)
{
delete this;
return true;
}
return false;
}
I am not sure what to do about this. The only area in my code where I use texture is when I load into a mesh using driver->getTexture, such as:
As the comment says - textures are just an example.
You probably call drop() for something which you didn't create with new or with a function starting with create.
Well I have made sure that I am dropping everything I create, so would it be correct to assume that this is the reason: This may also be due to the user pressing F12 while ZombieWorld.exe has focus.