Link to home
Start Free TrialLog in
Avatar of Krafer
Krafer

asked on

Bitmap background with OpenGL objects in front

Hi!

I have a bitmap (CBitmap) I want to use as a background when drawing OpenGL
objects on top of it (Visual C++ 4.0 in Windows 95), but I don't get it
right...
The OnDraw function works fine when drawing just the OpenGL objects, but
when trying to draw a background first, the screen just flash between the
OpenGL drawing and the background... (terrible!)
I use the following call to draw the background:

pDC->BitBlt(0, 0, m_cxWnd, m_cyWnd, m_pDCMem, 0, 0, SRCCOPY);

m_pDCMem is a DCD and gets a bitmap object from:  m_pDCMem->SelectObject(
pBM),  (pBM is a CBitmap object)

Do I have to use an OpenGL command to draw the background bitmap or is
there another solution?

Thanks!!
ASKER CERTIFIED SOLUTION
Avatar of RONSLOW
RONSLOW

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial