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 ?
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.
Thanks, I’ll have to store my data another way if display lists can’t be shared, no problem anyhow.