Archived

This topic is now archived and is closed to further replies.

NeXius

glTexSubImage2D... funky colors

Recommended Posts

NeXius    124
Hi I''m trying to combine a texture with another using glTexSubImage2D() but I can''t get it to work. I first tried going off the examples in the Red Book and then when I couldn''t get that to work I tried using NeHe''s code in the AVI tutorial... And I still can''t figure it out. The sub image that''s displayed is just mostly black with some occasional green and red splotches. This is really annoying. Any help? THANKS

Share this post


Link to post
Share on other sites
zedzeek    529
its quite easy to get working the only thing is maybe is
youre using different formats
eg try both with GL_UNSIGNED_BYTE (ie not one with GLubyte + the otherwith GLfloat)
also are u doing as RGB image dat into another RGB texture + not say a LUMINANCE data into a RGBA texture

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
NeXius    124
It''s actually the same texture...

After playing around with it for awhile I got rid of the colors and now it''s just a really obscured image of what it''s supposed to be.

Here''s a pic, if it helps

http://www.members.shaw.ca/steve_vermeulen/myproblem.jpg

I''m reading it in as GL_UNSIGNED_BYTE and as GL_RGB.

Thanks for the reply though

Share this post


Link to post
Share on other sites