Re: rewrite glRotate?
- From: "Gernot Frisch" <Me@xxxxxxxxxxx>
- Date: Tue, 30 Oct 2007 14:57:38 +0100
Do it yourself and just put the matrix into OpenGL with
glLoadMatrix. The matrix stack and everything else still works,
but as you already figured out it gives you the advantage in
haing the matrix already hat hand when you need it.
Also all matrix functions of OpenGL are not HW accelerated
anyway, so you can actually gain some performance if you do
reimplement them yourself.
Works fine. One problem:
The order I stored the glRotate calls before, was reverse order.
Assume you have a pointer pointing towards (+)z-axis.
Then:
glRotate(90, -1,0,0)
makes it point to (+)y axis. Fine.
Now I want to rotate "this" thing arount z axis:
glRotate(90, 0,0,-1)
should make it rotate pointing to x axis.
But OpenGL is the other way round.
My brain is too small to understand "why" the reverse order?
.
- Follow-Ups:
- Re: rewrite glRotate?
- From: Wolfgang Draxinger
- Re: rewrite glRotate?
- References:
- rewrite glRotate?
- From: Gernot Frisch
- Re: rewrite glRotate?
- From: Wolfgang Draxinger
- rewrite glRotate?
- Prev by Date: Re: WGL_EXT_swap_control System Requirements
- Next by Date: Re: rewrite glRotate?
- Previous by thread: Re: rewrite glRotate?
- Next by thread: Re: rewrite glRotate?
- Index(es):
Relevant Pages
|