PDA

View Full Version : Multiple viewports



pramod
04-25-2007, 12:50 AM
hi all, i need some details regarding viewport in opengl & are follows
1) is it possible to have two windows with different viewport.
2) is it possible to relate one viewport to the other viewport, that is, if i apply an texture or draw model in one window will that same texture or the model be placed in the other window also!
3) if these are possible, than i need the details regrading the same..
Thanking You

ZbuffeR
04-25-2007, 09:50 AM
1) yes, create your window with a GL context as usual, do it for the second window. Then render whatever your want, separately on each window.
2) yes, use wglShareLists to share display lists, textures, etc, see question 21.08 here : http://www.opengl.org/resources/faq/technical/texture.htm#text0080
3) A simple tutorial with GLUT, for multiple subwindows within a single window :
http://www.lighthouse3d.com/opengl/glut/index.php?subwin