<onur.tugcu@[EMAIL PROTECTED]
> wrote in message
news:27339759-c355-44c6-afd1-28dc0b181de4@[EMAIL PROTECTED]
> Hi all,
>
> I've written different "camera" codes, one uses spherical polar
> notation with two angles, the other one uses a quaternion for
> rotation. However I feel like I'm missing out on something. So many
> calculations are done by the opengl library, so I should be able to
> make use of at least some of them.
>
> So the question is, is there any way that I can glRotate and find the
> current internal direction vector or orientation matrix? glGet
> GL_CURRENT_NORMAL always gives me 0, 0, -1. I think there should be a
> way to calculate the real (non-relative) normal vector of a polygon
> surface, maybe use that polygon to find the camera normal vector.
>
> Perhaps there is a GLSL way? I haven't looked into that one yet.
> Thanks for your attention.
Normals aren't something computed by OpenGL - ever. You supply any normal
you want for a triangel solely for the purpose of lighting. If you want
the
"real" normal, just apply the current transform (gluproject()) to a
computed
"relative" triangle normal *that you supply*. Not really sure what you
mean
by "camera normal". To get the direction vector, just gluproject whatever
vector you are wanting to get, to get a projected vector.
-jbw


|