However, because I am playing around with matrix multiplications, the glFog() seems to be working on the wrong axis.
Here is my renderFrame() method:
void RenderFrame(){ glEnable(GL_DEPTH_TEST); glEnable(GL_CULL_FACE); glViewport(0, 0, g_windowWidth, g_windowHeight); glClearColor(0.3f, 0.5f, 0.9f, 0.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMultMatrixf(&g_camera.getProjectionMatrix()[0][0]); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glMultMatrixf(&g_camera.getViewMatrix()[0][0]); RenderTerrain(); RenderText();}
Here are a few screenshots to illustrate the problem:
image 1
image 2
image 3
As the camera turns to look down the Y axis, the fog takes affect. How can I fix this?
Any help would be much appreciated thank you!
[Edited by - Total_Titillation on August 1, 2010 3:13:08 PM]