Using OpenGL in a Normal Window (Win32)

I want to use OpenGL in my WndProc, but I'm not sure how. I also don't want GL to take up the whole screen, just part of the screen. In the end I basically want to make a win32 drawing application, but instead of OGL instead of GDI. so how can i tell GL to use my hdc control (panel) to paint?

thanks

+2


a source to share


2 answers


When you call wglCreateContext

, pass control to HDC instead of window. The same works with OpenGL and DirectX.



+3


a source


You can use wglCreateContext

on any HDC, but you cannot mix drawing with GDI.



0


a source







All Articles