Can't draw textures on child controls

Started by
0 comments, last by Dave Hunt 19 years ago
I can't draw textures on the child controls. I set up opengl on the child control just like I did with the main window. And it is made current after that I create the texture. In my drawing routine, when the main window needs drawn on I do this: wglMakeCurrent(GetDC(wnd->Hwnd), wnd->hGL); and yes I am using OWN_DC before I draw call any gl functions. The main wnd works fine. But when I do the same with the child window, it draws to the left hand corder of the main window instead of the child!
*C++*->
Advertisement
Did you check the return value of wglMakeCurrent to be sure it actually succeeds? It may be that it is failing, which might indicate a bad hDC or hRC.

This topic is closed to new replies.

Advertisement