Hello,
I want to make a screenshot (within my program) from the context opengl is painting to.
Therefore I first used the DC of the window, but the problem is, that when another window is painted over my OpenGL window, then the screenshot contains the window above.
So I decided to copy the content of my OpenGL window into a MemoryDC.
What I did is something like
MemDC = CreateCompatibleDC(WindowDC);
…
OnDraw()
{
wglMakeCurrent(MemDC, m_OpenGL.m_HGLRC);
…
}
I hoped that now OpenGL paints into the MemDC but this seems to be wrong. Can someone help me what my mistake is (I am a beginner on DC and OpenGL… so type slowly
BTW, I am using DoubleBuffer im my function and most of the time the function draws to a window.
Thanks a lot for your help,
Heiko