glClearColor

Not sure why glClearColor does not work for me?

I am compiling on linux (gcc) including the glut lib. It seems like setting glCLearColor has no effect for me. The “background” color seems to be set by random. I really want it to be black. I have observed this behavior with others code (even redbook), compiled on my machine and pre-compiled binaries. So this leads me to believe that is is not a problem with coding, but something else.

Anyone else seen this? Got a solution / work around? Thanks.

Are you calling glClear before you draw?

glClearColor only set the color.

I have used gcc with openGL in linux and never had this problem.

Originally posted by darren:
[b]Not sure why glClearColor does not work for me?

I am compiling on linux (gcc) including the glut lib. It seems like setting glCLearColor has no effect for me. The “background” color seems to be set by random. I really want it to be black. I have observed this behavior with others code (even redbook), compiled on my machine and pre-compiled binaries. So this leads me to believe that is is not a problem with coding, but something else.

Anyone else seen this? Got a solution / work around? Thanks.[/b]

Yup,

glClear(CL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

wierd eh?

ah,

ment GL_COLOR_BUFFER_BIT

Weird. The default values for glClearColor are all 0, so it should be black by default. Maybe something with your OpenGL implementation is screwy. What do you have for a video card?

The nVidia drivers for Linux are pretty good, but I haven’t really played with the Linux drivers for any other cards.

I thinking this might be it to.

Have not messed with the nVidia drivers here at work. Other fish to fry first.

But use the latest a home (for gaming), thier GRRREAT!