How can i create 3-D sight on another 3-D sight ?

Hello,

i have created a 3-D sight with OpenGL and now i want create another on this OpenGL - Window another small OpenGL - Window in the right corner of the other one. How can I do this ?

Thanks for your help

Are you using GLUT?
With GLUT you can create subwindows inside the main window.

Originally posted by MeadowDreamer:
[b]Hello,

i have created a 3-D sight with OpenGL and now i want create another on this OpenGL - Window another small OpenGL - Window in the right corner of the other one. How can I do this ?

Thanks for your help[/b]

Originally posted by nexusone:
[b]Are you using GLUT?
With GLUT you can create subwindows inside the main window.

[/b]

No, i don’t. I use only the commands with gl* and glu*. My OpenGL - Graphic ist in a window which is create with QT.

I have not used it but glscissor command also I think will do it.
I don’t have a example handy, but do a search on the command.

Originally posted by MeadowDreamer:
[b] No, i don’t. I use only the commands with gl* and glu*. My OpenGL - Graphic ist in a window which is create with QT.

[/b]

You can change where you are drawing in with glViewport. You will have to update your projection matrix, though.

– Thomas

How can i prevent with glViewport that the background of my second OpenGL - Window repaint the background of my first OpenGL - Window. The background of my first OpenGL - Window is black and the background of my second OpenGL - Window is white. Or in other words: “The second window should lay over the first one and they should be independ from each other”.

[This message has been edited by MeadowDreamer (edited 10-22-2002).]

What makes the window backgrtounds different colours, you drawing on them or clearing ther colour buffer?

i clear the colour buffer if i want draw the second window. But i suppose that it wrong and that i should find another order.

I want create two windows. A big one and a small one. First of all i create the big OpenGL - Window with glViewport, glFrustum and so on and after this i want create a small OpenGL - Window in the right corner which ist indepent from the first. I want create it with glViewport, glFrustum and so too. But for example glFrustum will defined for both and i don’t know and the moment how i can prevent it.
Have someone proposals ?

Thanks for help

You may pass your code into another Device context. Or at least you can use another projection matrix. I think that is enough. However I mainly advise you to use OOP for your scene. This will make your code more clear and it will help you to control more than 2 scene like things. You create an abstract data layer for your scene and another class that renders the scene to your primary device context. Late on you may use pointers to switch between back and forth to the windows.

hi, i just read in another topic a link to someting similar… multiviews (not inside each other, but besides). maybe it helps you: http://www.xmission.com/~nate/sgi.html

Well using the viewport will work, but obviously you will need to draw both windows each time, which you don’t want to do. So maybe render to texture and then texture map as you want to 2 windows. so you only need to re render each window as the contents change.