Can I reverse the GL texture coordinate system?
Can I reverse the GL texture coordinate system?
Basically the textures 0,0 seems to be different from that of RAVE...
So... every texture is upside down :-)
Is there an easy way to reverse this like it was to set the left hand coordinate system
for the view/projection matrix?
Maybe do somthing to the texturematrix(?) I think there is one?
Basically the textures 0,0 seems to be different from that of RAVE...
So... every texture is upside down :-)
Is there an easy way to reverse this like it was to set the left hand coordinate system
for the view/projection matrix?
Maybe do somthing to the texturematrix(?) I think there is one?
You could use the texture matrix, which works just like the others (set the matrix to GL_TEXTURE). Ylthough you'll have a performance penalty if this matrix is not set to identity, so that's not an optimal solution. You can also flip all all of your 't' texture coordinates. Finally, you could just flip the images as you load them, which shouldn't be too difficult, depending on how you load them.
Remember that everything in opengl has the origin bottom left. So if your using quicktime or similar to load your textures you need to do a flip. It's best to do this at load time, then you don't have to worry about it. If you need to know how to do this post another message.
Quote:Originally posted by henryj
Remember that everything in opengl has the origin bottom left. So if your using quicktime or similar to load your textures you need to do a flip. It's best to do this at load time, then you don't have to worry about it. If you need to know how to do this post another message.
Im useing glpng.c open source code for loading PNGs into GL textures.
Now I could modify that to do the flip for me...
Which will probably be a pain.
Or do you have better solution?
can you get GL to flip the texture for you after you load it from the file?
how hard would it be to just do 1-coord.y whever you use the y-coord? If your rendering code is written right, that should only be a couple places.
"He who breaks a thing to find out what it is, has left the path of wisdom."
- Gandalf the Gray-Hat
Bring Alistair Cooke's America to DVD!
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL global and local coordinate problem. | mikey | 4 | 3,115 |
May 26, 2009 08:48 AM Last Post: mikey |
|
| Texture coordinate problem | Oddity007 | 0 | 1,654 |
Jan 21, 2009 06:20 PM Last Post: Oddity007 |
|
| terrain texture coordinate calculation | akb825 | 12 | 7,798 |
Feb 27, 2007 04:56 PM Last Post: akb825 |
|
| Reverse Engineering 3d File Format | nabobnick | 1 | 2,542 |
Aug 13, 2004 12:11 PM Last Post: nabobnick |
|

