GL Color
Im having color problems...
if I specify a vertex color for drawing lines
glColorsf( 1.0, 1.0, 1.0 );
I get a medium grey color and NOT white.
Why am I getting grey?
Here is my AGL init code...
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glEnable( GL_BLEND );
glEnable( GL_ALPHA_TEST );
glAlphaFunc( GL_GREATER, 0.0 );
glEnable( GL_TEXTURE_2D );
glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ONE );
// BACK GROUND COLOR //
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
// CLEAR ZBUFFER TO THIS DEPTH //
glClearDepth(1.0f);
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
glEnable( GL_DEPTH_TEST );
glShadeModel( GL_SMOOTH );
if I specify a vertex color for drawing lines
glColorsf( 1.0, 1.0, 1.0 );
I get a medium grey color and NOT white.
Why am I getting grey?
Here is my AGL init code...
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glEnable( GL_BLEND );
glEnable( GL_ALPHA_TEST );
glAlphaFunc( GL_GREATER, 0.0 );
glEnable( GL_TEXTURE_2D );
glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ONE );
// BACK GROUND COLOR //
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
// CLEAR ZBUFFER TO THIS DEPTH //
glClearDepth(1.0f);
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
glEnable( GL_DEPTH_TEST );
glShadeModel( GL_SMOOTH );
Quote:Originally posted by monteboyd
Do you have lighting enabled? If so, that might be causing the problem.
No, None
Im doing my own lighting and sending the points through.
I notice you're enabling texturing. Do you have a texture bound?
Quote:Originally posted by OneSadCookie
I notice you're enabling texturing. Do you have a texture bound?
Oooo good idea that might be it...
How can UNBIND a texture if its still bound?
Or when does it stop being bound?
Textures don't stop being bound.
You can unbind by binding texture 0 (which is treated as a white, opaque texture). That puts you back to the state you were in before you first bound a texture.
To be really sure, you should disable texturing.
You can unbind by binding texture 0 (which is treated as a white, opaque texture). That puts you back to the state you were in before you first bound a texture.
To be really sure, you should disable texturing.
Quote:Originally posted by OneSadCookie
Textures don't stop being bound.
You can unbind by binding texture 0 (which is treated as a white, opaque texture). That puts you back to the state you were in before you first bound a texture.
To be really sure, you should disable texturing.
Oh Yeah BABY!!
That was it.
Thanks for the help :-)
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| ? Find color value of 'pixel' in color buffer? | Elphaba | 1 | 3,483 |
Jul 22, 2009 01:23 PM Last Post: Bachus |
|

