rendering into DIB under Win32
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.
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.
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
Popular Topics
Advertisement
Recommended Tutorials
Advertisement