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

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?

thanks

hi

  • 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…

PFD_DRAW_TO_WINDOW
PFD_SUPPORT_OPENGL
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…
Matt.

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

The contents of frame buffers are undefined until you clear them or do something else to put defined bits into them.

Hi,

~

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