GL Color

Member
Posts: 110
Joined: 2002.04
Post: #1
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 );

- Mac Lead ZeniMax Online Studios
- Owner Plaid World Studios
- Resume: http://www.chrisdillman.com
Quote this message in a reply
Member
Posts: 353
Joined: 2002.04
Post: #2
Do you have lighting enabled? If so, that might be causing the problem.
Quote this message in a reply
Member
Posts: 110
Joined: 2002.04
Post: #3
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.

- Mac Lead ZeniMax Online Studios
- Owner Plaid World Studios
- Resume: http://www.chrisdillman.com
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
I notice you're enabling texturing. Do you have a texture bound?
Quote this message in a reply
Member
Posts: 110
Joined: 2002.04
Post: #5
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?

- Mac Lead ZeniMax Online Studios
- Owner Plaid World Studios
- Resume: http://www.chrisdillman.com
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
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.
Quote this message in a reply
Member
Posts: 110
Joined: 2002.04
Post: #7
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 :-)

- Mac Lead ZeniMax Online Studios
- Owner Plaid World Studios
- Resume: http://www.chrisdillman.com
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  ? Find color value of 'pixel' in color buffer? Elphaba 1 4,497 Jul 22, 2009 01:23 PM
Last Post: Bachus