PDA

View Full Version : View Cube



Aliii
06-06-2012, 02: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:

http://uploadpic.org/v.php?img=M4hlwF8ATp

Is there a way to do that?
Thanks!

tonyo_au
06-06-2012, 03: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.

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