PDA

View Full Version : rendering to DC colour problem



mcsellski
01-25-2002, 04:52 AM
Hi, I guess this is advanced...

I'm rendering my scene to a DC and displaying the bitmap elsewhere in my application as a thumbnail.

The problem I have is that if the clear colour is black I don't see anything, just black. If I set it to white, I see my rendered objects just fine.

I was wondering if someone could explain to me what might be happening so that I can try and sort it out.

Many thanks

matthew

opla
01-25-2002, 05:09 AM
maybe the 4th parameter of glClearColour, the alpha value ...

mcsellski
01-27-2002, 11:46 PM
Thanks for the tip, although it has not helped.

I now set glClearColor(R,G,B,0.0);

It's the same symptom. If the BG colour is black, then the bitmap I render to the DC is black. If it is a lighter colour then the bitmap in the DC is exactly what I see on the rendered view.

It's all very odd.

Matthew

dorbie
01-28-2002, 02:36 AM
This sounds like some strange blend function is on. Perhaps you are modulating source color by destination color or destination color by source color. try glDisable(GL_BLEND) prior to drawing the bitmap.

If this works you need to fix your overall OpenGL state management.