itexture->lock()
itexture->lock()
when using this to copy from one texture to another, if using any mipmapLevel other than zero the copied data comes out upside down and mirrored.
Re: itexture->lock()
in fact no copying is needed
will mirror and flip the map at mip level 2
this is in opengl btw
Code: Select all
driver->setTextureCreationFlag( ETCF_CREATE_MIP_MAPS,true);
ITexture* detailMap = driver->getTexture(YOUR_TEXTURE_NAME_HERE);
unsigned int* sdata = (unsigned int*)detailMap->lock(false,2);
detailMap->unlock();
this is in opengl btw
Re: itexture->lock()
I had some similar troubles when i tried to perform some postproduction using OpenGL without shaders. For some reason, Open GL flips the textures and it seems it is the way GL works, not Irrlicht.
http://irrlicht.sourceforge.net/forum/v ... =9&t=39022
http://irrlicht.sourceforge.net/forum/v ... =9&t=39022
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: itexture->lock()
i think in this case it's an irrlicht issue, if you change index of the lock to 0, it works fine.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: itexture->lock()
Do you use an Intel gfx card? Please check if GL_MESA_pack_invert is supported by your card. Could be that this extension only works for topmost texture level.
Re: itexture->lock()
no it's an nvidia 8800 GTS, whether it supports it I have no idea,
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: itexture->lock()
Hmm, don't think so. So I'll have to extend the test case to see for myself.
Re: itexture->lock()
As I remember itexture->lock() doesn't work on AMD Radeon cards, when we try get level > 0, but this isn't Irrlicht issue, but drivers I think.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes