-
OpenGL Viewports
I'm writign a 3D pool game, and want to have a plan view of the table aswell as the main 3D view
is it possable to only draw the scene once and have 2 separate viewports with different camera settings or will I have to draw it for each viewport?
in pseudocode
Code:
create viewport
setup camera
create second viewport
set up second camera
draw pool table
or
Code:
create viewport
setup camera
draw pool table
create second viewport
set up second camera
draw pool table
the only difference is that I draw the table trice on the second one, and I dont think it will effect performance too much, but if it can be drawn once it would be more convenient and give a small increase in performance
another question
when opening a window to draw to how do you make sure that the editable area of the window is at for example 640x480 and the window border goes around that?
-
Create two camera's, Capture the scene, Convert the captured
2 scenes to textures, Scale the textures to 1\2 the screen on the
y axis, Render the textures in the orthographic mode.