PDA

View Full Version : cube



Julia
03-01-2001, 01:23 PM
I am trying to draw a 3D cube that will have no Perspective, so for example: the angel between the bottom side and the right side (and between the bottom and the left side, etc...) would be 90 degrees (or really close to 90).
I am using:
glLoadIdentity();
glTranslatef(0.0f,0.0f,-8.0f);
glRotatef(40,1.0f,0.0f,0.0f);
glRotatef(30,0.0f,1.0f,0.0f);

glBegin(GL_QUADS);
....
It is positioned almost the way I want it, except the agle between sides is not 90 degrees (or close to 90).

Should I use some other functions to make it work right?

Thank you,
Julia

john
03-01-2001, 01:48 PM
Hello,

look up the orthogonal camera model. gluOrtho2D, glOrtho, yada yada.

cheers,
John

Hermann
03-01-2001, 01:58 PM
You quite confuse me... what do you mean "a cube without perspective"? A 2D-cube?

DaViper
03-02-2001, 01:28 AM
I am trying to draw a 3D cube that will have no Perspective

You always have a perspectiv view view, otherwise it wouldn't be a 3 dimensional Projection, what you want is a perspectiv view without distortion, therfore you have to set up a orthogonal viewing volume by using glOrtho(....) as John said

cheers
Chris

Julia
03-03-2001, 07:13 PM
Thanks you, guys, glOrtho worked!!!