PDA

View Full Version : OpenGL in a Windows MDI Child Window Splitter pane



[SW]Falcon
07-06-2000, 06:50 PM
Has anyone got any sample code for initializing OpenGL in an MFC MDI forms child Window with a 4way splitter much like 3Ds max. Either that or does anyone have any other documentation on how to initialize OpenGL in the 4 different panes of the splitter window ?

Siwko
07-07-2000, 10:24 AM
Well, unless you're using seperate types of view classes for each pane (which you probably don't need to from what it sounds), you simply write into your view class the standard initialization routines to obtain the rendering context(s), etc. Everything should be local to the view.

The only difference is that every time you want to draw to a view in an MDI-style environment, before you draw, be sure that the view calls wglMakeCurrent with its dc and rendering context to make the view the current renderer. Otherwise you render to an invalid context.

Finally, remember, you cannot share display lists across rendering contexts, so if you use them, you have to have a display list for each context.

Hope this helps. http://www.opengl.org/discussion_boards/ubb/smile.gif

Siwko

[SW]Falcon
07-09-2000, 05:16 PM
Thanks, I'll have to store my data another way if display lists can't be shared, no problem anyhow.

[SW]Falcon