Is it possible to create an opengl space without glortho or glu perspective

Hi,

is it possible to create an opengl space without glortho or glu perspective?

i have an opengl code which draws a 3d object but it doesnt have anyone of these to functions.

So where does it specify the size of the frustum?

OpenGL has defaults for all states.
The default for all matrices is the identity which makes the default viewing frustum to be identical to glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0).

Read the OpenGL programming guide (search for redbook.pdf) and the OpenGL 2.0 specs.

Originally posted by tirengarfio:
[b]
is it possible to create an opengl space without glortho or glu perspective?

So where does it specify the size of the frustum? [/b]
Both those functions only modify current matrix. The program can calculate the projection matrix in its own way and use the glLoadMatrix function to upload the resulting matrix.

And of course there is glFrustum :wink:

yes the size of your space is always a 2x2x2 cube centered at the origin and your transformation matrix maps coordinates into that space, so with the identity matrix ana point (x,y,z) with an x value of -1 gets mapped to the left side of the vieport, x=1 to the right, y=-1 is the bottom, y=1 is the top, z=1 is closest to you, and z=-1 is the firthest away.

Note, when you load the identity transformation matrix, the x axis points to the right, y points up and z towards you, but after glOrtho(-1, 1, -1, 1, -1, 1) z points away from you.