View Full Version : rendering to DC colour problem

01-25-2002, 03: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


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

01-27-2002, 10: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.


01-28-2002, 01: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.