Displaying different graphics in multiple OpenGL windows

I am stuck with displaying multiple windows in openGL ... That is, if I display two windows, tranformation is not possible in both windows ... Is there any other way I can do this .. ???

0


a source to share


2 answers


Each window must have its own OpenGL context, so you will need to perform the same operations on each window to keep the views consistent. If you render the geometry transformation in the first context, it will only appear in the second context if it is explicitly done in the second context.



More information on your settings and desired goals will be helpful. What platform are you running on? Are you trying to display the same scene from different views in different windows or render different scenes in different windows?

+2


a source


Tutorial # 42 of the NeHe OpenGL Tutorials shows how to have multiple viewports (which you can have in a single window or in multiple windows).



Also, here is some source code which is a modification of this tutorial using multiple windows.

+1


a source







All Articles