That´s my question… How can I retrieve parameters like my camera position, my direction of view (vector) etc…
It´s because I have some triangles representing a surface. There is a lighting but It only lights one side of that surface. Now I want to rotate the surface and the problem is that i can not see the details of the back side because the normals are pointing to the other side. What can I do to make both surface sides lighted without painting It twice??
>
That´s my question… How can I retrieve parameters like my camera position, my direction of view (vector) etc…
<
I think it would be best if you kept track of the positions yourself…
If you use glulookat, you have to specify a camera position, and a focus point, so if you keep these values in a variable, you already have it.
>
It´s because I have some triangles representing a surface. There is a lighting but It only lights one side of that surface. Now I want to rotate the surface and the problem is that i can not see the details of the back side because the normals are pointing to the other side. What can I do to make both surface sides lighted without painting It twice??
<
There is a 2 sided lighting model you can use…glLightModel*(GL_LIGHT_MODEL_TWO_SIDE);
>>w can I retrieve parameters like my camera position, my direction of view (vector) <<
?
with glulookat
the first 3 ARE the cameras position
the second 3 are where the cameras looking at this the viewing direction is the vector from one to the other