I am making a simple opengl application where I have a cube and I want to move forward to it with the glTranslate3d function, where I change the z index. One would expect the object to get bigger because of the view but it does not
glClearColor(0, 0, 0, 1); glClearDepth(1.0); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glOrtho(30, width, 0, height, 100, -100); glMatrixMode(GL_MODELVIEW);
I have tried many things also I have been told that gluPerspective is out dated and should not be used....
EDIT: it works when I rotate the object you can see how 3d it is :p