PDA

View Full Version : glFog and axis problem


tigakub
2005.03.25, 03:03 PM
I'm having a wierd time with glFog. When I enable it, it seems to cause color attenuation along the world z-axis rather than the camera z-axis (i.e. the depth buffer). Has anyone else seen this or know what I'm doing wrong? Do I have to enable fog at a particular point in the code (e.g. before or after projection transformations, view point transformations, etc.)?

OneSadCookie
2005.03.25, 05:43 PM
you need to do your viewing transformations (eg. gluLookAt) on the modelview matrix, not the projection matrix.

tigakub
2005.03.25, 09:32 PM
oh. i was wondering about that. thanks!