Texture issues

Started by
2 comments, last by Prince Aron 20 years, 10 months ago
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?
"In the beginning the universe was created. This has made a lot of people very angry and has been widely regarded as a bad move."
Advertisement
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]
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);
"In the beginning the universe was created. This has made a lot of people very angry and has been widely regarded as a bad move."
I don''t know about ATI, but Nividia, for Windows, has this thing that where you can set the texture details:
Use the same BPP as the desktop.
Always use 16 bpp
Always use 32 bpp
Maybe ATI has a similar thing?

Height Map Editor | Eternal Lands | Fast User Directory

This topic is closed to new replies.

Advertisement