My projects: SUGG (M, KS), SYNONS, URLS, SIMILAR, Misc: 3Dengine, UniteHowTo, FliCC, TripIdeas, My blog.
Old/abandoned: TheRarestWords (TcCrnch).
Hi, I'm Slava V. and I develop those projects in free time. rarestwords@mail.ru
To main page | 3dengine.org

Flipping axes


It is often desirable to change the direction of axes in OpenGL. This can be achieved via glScale and glRotate calls.

For example to make z-axis go into the screen, instead of going into the user, use:
glScalef(0,0,-1)
To make XY flat plane and Z going up, use:
glRotatef(-90,0,0,1)
glRotatef(-90,0,1,0)