View Full Version : glFlush ran right after OpenGL initialization = background RGB (115,178,181). Why?

06-27-2003, 07:45 PM
NOTE: I posted this in the beginners forum but it seems nobody knows.

So the situation is the following:

I test an empty win32 OGL project: singlebuffer, window background NULL, the pfd struct empty (except ...DRAW_ and OGL_SUPPORT const and nVer =1) and I _understand_ what glFlush does.

The question is: I do not get WHY right after the init of OGL when I glFlush I get the background of RGB (115,178,181)?. Does OGL inits the context with these RGB values or smth esle is going on?


06-28-2003, 01:53 PM
- im not confident that i know the answer
to your question..perhaps more detail would
be good.
Though i suspect it could have something to
do with not setting enough preference fields
in the pixel format descriptor..

ipixeltype = PFD_TYPE_RGBA
ccolorbits = 16,24,or 32...

try those options..i havent tried without
using them...
hehe..it may even have nothing todo with
this. You may have forgotten to zero the
fields of some data structure?

[you do define your clear color?]
[glClearColor(0.0f, 0.0f, 0.0f, 0.0f);]

anyway..best of luck...

[This message has been edited by Defoc8 (edited 06-28-2003).]

06-28-2003, 02:58 PM
The contents of frame buffers are undefined until you clear them or do something else to put defined bits into them.

06-28-2003, 04:51 PM

Play with the pfd strct field

I played a lot with the fields. no result same color that's why I asked. And I glFlush right after wglMakeCurrent.

they r undefined

yep. it's more likely