texture coordinate flipping operation
Posted: Thu Jul 12, 2007 5:34 am
hey, for the opengl driver the texture coordinates on the Render to texture target are upside down.
Now, I know i can edit the texture coordinates through the lock and unlock methods, but i only see operations for working on pixel data-
does that mean to flip these textures im going to have to change the texture matrix manually pixel by pixel?
I read all of these posts on the texture operations:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=18017
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=21668
http://irrlicht.sourceforge.net/phpBB2/ ... ht=#114676
http://irrlicht.sourceforge.net/phpBB2/ ... +text+axis
http://irrlicht.sourceforge.net/phpBB2/ ... tate++text
(and many others involving RTT +the OGL/D3D texture issue).
Yet they all offer vague descriptions not really relating to my issue.
I also read the documentation on the RTT issue. AND I know I can get the texture matrix data through the material system, the problem is I don't know what to do with that information...
I guess what I'm looking for is what others have done to solve this issue-
I understand I need to flip the texture coordinates, but I don't understand the operation involved to flip them. What would the algo to flip these textures look like? Would it be a simple matter of redefining matrix values or do I have to apply the changes pixel by pixel in my code (seems inefficient to do manually)?
Or perhaps a simple buildTextureTransform()?
Thanks in advance for any advice. I know I'm asking for alot of retarded explanation, and I apologize for that, but I've been stuck here mentally and I don't know how to progress.
Now, I know i can edit the texture coordinates through the lock and unlock methods, but i only see operations for working on pixel data-
does that mean to flip these textures im going to have to change the texture matrix manually pixel by pixel?
I read all of these posts on the texture operations:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=18017
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=21668
http://irrlicht.sourceforge.net/phpBB2/ ... ht=#114676
http://irrlicht.sourceforge.net/phpBB2/ ... +text+axis
http://irrlicht.sourceforge.net/phpBB2/ ... tate++text
(and many others involving RTT +the OGL/D3D texture issue).
Yet they all offer vague descriptions not really relating to my issue.
I also read the documentation on the RTT issue. AND I know I can get the texture matrix data through the material system, the problem is I don't know what to do with that information...
I guess what I'm looking for is what others have done to solve this issue-
I understand I need to flip the texture coordinates, but I don't understand the operation involved to flip them. What would the algo to flip these textures look like? Would it be a simple matter of redefining matrix values or do I have to apply the changes pixel by pixel in my code (seems inefficient to do manually)?
Or perhaps a simple buildTextureTransform()?
Thanks in advance for any advice. I know I'm asking for alot of retarded explanation, and I apologize for that, but I've been stuck here mentally and I don't know how to progress.