PDA

View Full Version : Strange behaviour when using rgba textures



asmcode
03-10-2010, 06:40 AM
Hi,

is this normal, that textures created using glTexImage2D, with the format GL_RGBA of unsigned byte, with each pixel in texture data is set to (0, 0, 0, 0), is displaying as white?

If I change every color pixel in texture data to (0, 0, 0, 255), then they are displayed as black!

i have disabled light, blend, color_material...

Ilian Dinev
03-10-2010, 07:48 AM
Try:
glTexEnv (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

asmcode
03-10-2010, 08:14 AM
still not working:/ texture is white

sqrt[-1]
03-10-2010, 09:07 PM
If you have mip-mapping enabled, ensure you supply the entire mip chain.

nickels
03-16-2010, 01:56 PM
If (255, 0, 0, 255) displays red then its just the alpha channel. What are you trying to do?