how can I draw Opengl to DDB Bitmap in windows API?
i try like this:
hdc = GetDC(hWnd);
GlPlane.hdcMem = CreateCompatibleDC(hdc);
GlPlane.hBitmap = CreateCompatibleBitmap(hdc,cxClient,cyClient);
SelectObject(GlPlane.hdcMem,GlPlane.hBitmap);
hrc = wglCreateContext(GlPlane.hdcMem);
wglMakeCurrent(GlPlane.hdcMem,hrc);
ReleaseDC(hWnd,hdc);
it doesn’t work
but what is wrong???