Can I create more instances of my G3D window?

5 views
Skip to first unread message

Hanyu Liu

unread,
Nov 9, 2009, 11:30:52 AM11/9/09
to G3D Users
I want to write a program that allows the user to create a new window
when they click a specified button in one exited window. Can this be
implemented?
Thank you!

Morgan McGuire

unread,
Nov 9, 2009, 2:07:47 PM11/9/09
to g3d-...@googlegroups.com
Yes...although beware that creating multiple OSWindow instances is a little hard, and it is hard because it is slow.  The slowness has nothing to do with G3D; making multiple 3D windows is always slow under any API because of the way that graphics cards work.  You might want to make multiple GuiWindows instead inside one OSWindow, which has no overhead.

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan

Hanyu Liu

unread,
Nov 9, 2009, 6:51:15 PM11/9/09
to g3d-...@googlegroups.com
I hope to implement a program shows 3D objects in one window and lets
the users to create new windows which shows the objects they selected.
So the users can make a comparison between the original view in the
first window and new view in the new window. Is there a window inside
OSWindow in G3D can do what I want? GuiWindows can do this?
Thank you!

Morgan McGuire

unread,
Nov 9, 2009, 8:10:51 PM11/9/09
to g3d-...@googlegroups.com
The traditional way of doing this (what most 3D modeling programs do) is to use RenderDevice::setViewport and just divide the screen into two or four pieces.

The newer way of doing it (which requires a GPU with the Framebuffer_Object extension) is to render to a texture and then use a GuiTextureBox or a custom Gui control in a GuiWindow, or your own direct rendering of that Texture to display the result.


-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan


Reply all
Reply to author
Forward
0 new messages