Advertisement

rendering into DIB under Win32

Started by August 06, 2002 03:29 AM
1 comment, last by silencioso 22 years, 6 months ago
Hi, Under Win32 I have a DIB created with CreateCompatibleDC() How can I tell openGL to render into that DIB ? Thanks
selectobject? not sure if it will work, though. check all return values to be on the safe side.
Advertisement
First of all, CreateCompatibleDC doesn''t create a DIB, it creates a Device Context(DC).

It is the correct first step, however. Next, use CreateDIBSection to create a DIBSection. Do not use CreateCompatibleBitmap - it does not create a DIBSection.

Use SelectObject to select the bitmap you''ve created into the Device Context and set the Pixel Format. Include the PFD_DRAW_TO_BITMAP flag in the pixel format descriptor.

This topic is closed to new replies.

Advertisement