View Full Version : View Cube

06-06-2012, 03:49 AM
Im working on a 3D modelling program. I have a view cube in the bottom left corner. I want to draw it in perspective mode, but when I look down the negative Z(initial camera angle), I only want to see its front side(Like its drawn in the centre of the window) I dont want to see the Top and Right sides like on the pic:


Is there a way to do that?

06-06-2012, 04:21 AM
If you want to draw in perspective mode there is always some potential to see the sides but to get the effect of the cube in the centre of the window, set a viewport in the bottom left corner (something like glViewport(0,0,50,50)) and render to it with a camera parallel looking straight at the cube - just like you would if you wanted to draw the cube in the centre of the window.

06-06-2012, 05:31 AM
Thanks! It works now.