Archived

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

Texture issues

This topic is 5312 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am currently writing an OpenGL game that uses a number of TGA files for 2D textures. For some reason, my textures are losing colors, for example, I have a button with a smooth blue gradient that appears banded on the screen. I am developing both a Windows and Mac OS X version. My Mac version does not have the problems. Both versions are using the same graphics files, the same graphics loading code (C++), the same OpenGL code. As near as I can tell, there might be something wrong with my pixel format on the Windows version. Can anyone help me with this?

Share this post


Link to post
Share on other sites
Sounds like a 16/32bit issue. Either your textures are stored in 16bit colour, or your desktop colourmode is set to 16bit. Check the later in the display properties, set it to 32bit (truecolour).

The textures themselves can be reduced to 16bit, if the driver feels like it, ie. if some hardware limitation restricts it from using 32bit textures (or if you specifically ask for it). What 3D card do you have ? How are you uploading textures (post your call to glTexImage2D) ?


[edited by - Yann L on May 28, 2003 7:11:23 PM]

Share this post


Link to post
Share on other sites
My video card is an ATI Rage Pro, but my problem occurs on other video cards as well, as I''ve had several people testing it.

I considered the 16/32 bit color issue. However, my call to change the screen to 640x480x32 does not return an error.

I don''t think that there is a problem with the OpenGL code, since the exact same code runs perfectly on my Mac, but here''s my tex generation anyway. I''ve modified some of NeHe''s routines, so it may look familiar.

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture[0].width, texture[0].height, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture[0].imageData);

Share this post


Link to post
Share on other sites