View Full Version : glClearColor
darren
02-27-2003, 08:20 AM
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.
nexusone
02-27-2003, 09:44 AM
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:
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.
darren
02-27-2003, 12:04 PM
Yup,
glClear(CL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
wierd eh?
darren
02-27-2003, 12:05 PM
ah,
ment GL_COLOR_BUFFER_BIT
Deiussum
02-27-2003, 12:16 PM
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.
darren
02-27-2003, 12:25 PM
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!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.