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?
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.