Reputation: 54173
I want to use OpenGL in my WndProc but I'm not sure how. I also don't want GL to occupy the whole screen, just a portion of the screen. In the end I basically want to make a drawing win32 app but use OGL instead of GDI. so how can I tell GL to use my control (a panel) 's hdc for drawing?
Upvotes: 2
Views: 1273
Reputation: 5413
You can use wglCreateContext
on any HDC, but you can't mix the drawing with GDI.
Upvotes: 0
Reputation: 48327
When you call wglCreateContext
, pass the control's HDC instead of the window. The same thing works on OpenGL and DirectX.
Upvotes: 4