PDA

View Full Version : MDI Views with OpenGL



Mike Harnad
02-22-2001, 01:32 PM
I've seen this question asked a few times, but, with no definitive answer. Does anyone know how to manage OpenGL in an MDI application that has a dynamic splitter? I have it set up so that each view in the splitter has its own RC, and, I call wglMakeCurrent BEFORE drawing (in OnDraw). Yet, OpenGL does not always update the view(s). It appears to be tied to the view that is "active". Any ideas?

TIA,
MIKE

mango
02-22-2001, 06:34 PM
I think that msdn is the only place to have information about stuff like that. A wild guess would be to have only one RC if that is possible.

Mike Harnad
02-23-2001, 05:12 AM
Thanks for the reply. I tried using one RC (in the CDocument class) with no luck. Each view will update only if it is the currently active view. Someone else suggested a separate display list for each view. I use a global display llist. Is this a problem?

mango
02-25-2001, 12:31 AM
I do not use it so I really do not know.
I did a search for mdi in the forum : http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/000827.html
says that you can not share display lists across rendering contexts.

I suggest that you do a better search in both forum and if no luck post in the advanced forum.

Mike Harnad
02-26-2001, 11:31 AM
Thanks to everyone who offered help. I have resolved this problem. The application is a COM based program. Within one of the interfaces that writes to the screen, the code was grabbing the "active" view. This was the only OpenGL view that was being updated. It made it appear that the rendering context was invalid, when, in fact the code was doing what it was told to do. To get around it, I moved the screen wriing code from the interface to the view. This resolved the problem.