My project is about generating path in a house. I think to create a window that user walk-thru in the house, while another window beside is for user to see the path generated that he/she walking thru, from top view of house. I'm not sure is it concern with multithreading, if yes, then I think it would be a problem for me, as I've not so much knowledge about it...
Any idea for me? Thanks you all...:worthy:
How to create multi-windows in openGL
Started by chingching, Mar 08 2006 05:29 AM
5 replies to this topic
#1
Posted 08 March 2006 - 05:29 AM
#2
Posted 08 March 2006 - 06:43 AM
At first I thought you needed multiple viewports in the same window, but that path could be simply plotted in a semi-transparent/blended rectangle at a corner of the window (sort of a HUD, having switched to 2D/ortho mode, of course).
#3
Posted 08 March 2006 - 06:43 AM
Multithreading is not necessary to do this, though it can help improve performance. It depends on how you set up your renderer. Usually in an OpenGL program there is a main loop that calls a render function each frame. You will just have to call two, one for each of the windows. Note that each window will have its own rendering context, so you will have to use wglMakeCurrent to switch between them.
reedbeta.com - developer blog, OpenGL demos, and other projects
#4
Posted 08 March 2006 - 01:07 PM
Why not just do all rendering in the same window? You have two view states, one perspective and one orthographic. First render your 3D perspective view of the house and then switch to an orthogonal view projection to render your birds-eye view somewhere else in the window. Not only is this easier, but having everything in one window has many benefits too.
http://www.nutty.ca - Being a nut has its advantages.
#5
Posted 08 March 2006 - 05:29 PM
Ya...thanks you guys...I'll try to get more detail about the ideas that you all provided...thanks a lot...really appreciate it...:worthy:
#6
Posted 08 March 2006 - 05:57 PM
Use wglShareLists() to share textures/vbos/etc. between the different contexes if you have multiple windows.
-si
-si
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












