View Full Version : Trouble with alpha channels in textures.
02-01-2004, 03:16 AM
What are the flags that I have to enable to make my program able to read the alpha channel of bitmaps? I've tryed so many techniques but they don't work or they don't produce the results I expected.
02-01-2004, 09:27 AM
Make sure you upload the texture using an alpha internal format (like GL_RGBA), and of course specify it using an alpha external format (such as GL_BGRA/GL_UNSIGNED_BYTE).
Then, just use the alpha in the pipeline as you want to. glEnable(GL_ALPHA_TEST) for alpha test, glTexEnvi() to set a texture environment function to something like GL_DECAL, or glEnable(GL_BLEND)/glBlendFunc(GL_SRC_ALPHA,
I think you might get better answers on the beginner's board, where this thread should have been, though.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.