glEnable(GL_TEXTURE_2D);
glShadeModel(GL_FLAT); // Enable Smooth Shading
glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black Background
glClearDepth(1.0f); // Depth Buffer Setup
glDepthFunc(GL_LESS); // The Type Of Depth Testing To Do
glEnable(GL_DEPTH_TEST); // Enables Depth Testing
//glEnable(GL_CULL_FACE);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations
i know that its fading out to black because of the clear colour but what is with the banding?? And can i stop it from fading to black at all? and actually use the alpha channels?
[This message has been edited by weebull (edited 03-22-2003).]
[This message has been edited by weebull (edited 03-22-2003).]
I’d say the banding is because your texture gets loaded as 16bit for some reason. Propably your display is set to 16bit colors. 16bit alpha textures look bad, because you only have four bits per color channel. Certain drivers load all textures as 16bit by default, to improve your changes to get 32bit textures, use GL_RGBA8 internal format.
The black edge is propably there, because you draw the circle on a black background with depth test enabled, and after that you draw the background, which gets behind the pixels that have already been blended with a black background. Always draw opaque objects first, and then the transparent ones, preferably with depth writes disabled and sorted back to front.