Switching Z/Y planes?

I have many stock models created with the X/Y plane as the ground plane and the Z axis used as an altitude coordinate. Can OpenGL be switched to use the Y axis as the depth and Z axis as vertical? Currently I am rotating the model initially on the X to get it orientated correctly before moving the camera.

Perhaps something such as this ?

glPushMatrix();
glRotatef(90.0, 1.0, 0.0, 0.0);
DrawYourObjectHere();
glPopMatrix();

or

glRotatef(90.0, 1.0, 0.0, 0.0);
DrawYourObjectHere();
glRotatef(-90.0, 1.0, 0.0, 0.0);

@+
Cyclone

If all your models need rotating, just rotate the modelview once before rendering the models, and then push and pop that matrix as needed. I would generally avoid cyclone’s accumulating method above (the second method shown) unless you were reseting the modelview matrix before each frame, or possibly before each model depending upon the number of models.

Hello,

something also worth considering is whether the geometry is left-handed.

cheers,
John

Good point. If you are using a right handed coordinate system, and the models are made in a left handed system, or vice versa, you will also need to mirror your models.