[SOLVED] createDeviceDependentTexture() parameters

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
AlfAlien
Posts: 20
Joined: Tue Jan 28, 2014 2:08 pm

[SOLVED] createDeviceDependentTexture() parameters

Post by AlfAlien »

I try to load GLES1 texture from file.
In CNullDriver.cpp I found this:

Code: Select all

 
texture = createDeviceDependentTexture(image, hashName.size() ? hashName : file->getFileName() );
 
createDeviceDependentTexture() must take 3 parameters, but I see only 2. It has signature

Code: Select all

 
ITexture* CNullDriver::createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData)
 
Where is mipmapData parameter? Can can I pass 0 (null pointer) as 3rd parameters to this function if I don't need mipmaps?

Code: Select all

 
texture = createDeviceDependentTexture(image, strName, 0);
 
Last edited by AlfAlien on Thu Feb 06, 2014 3:48 pm, edited 1 time in total.
AlfAlien
Posts: 20
Joined: Tue Jan 28, 2014 2:08 pm

Re: createDeviceDependentTexture() funciton and it's paramet

Post by AlfAlien »

Actually, it has signature:

Code: Select all

 
virtual video::ITexture* createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData=0);
 
That changes everything - mipmapData is the default parameter, we can pass 0.
Post Reply