fixed underwater projection

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2057 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-05-19 20:55:37 +00:00
parent b9b985fef7
commit 2f698c3df4
+6 -4
View File
@@ -780,9 +780,6 @@ void gl_drawframe(int w, int h, float changelod, float curfps)
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
farplane = fog*5/2;
gluPerspective(fovy, aspect, 0.15f, farplane);
glMatrixMode(GL_MODELVIEW);
if(underwater)
{
@@ -793,7 +790,12 @@ void gl_drawframe(int w, int h, float changelod, float curfps)
glFogi(GL_FOG_START, 0);
glFogi(GL_FOG_END, (fog+96)/8);
}
else if(waterreflect)
farplane = fog*5/2;
gluPerspective(fovy, aspect, 0.15f, farplane);
glMatrixMode(GL_MODELVIEW);
if(!underwater && waterreflect)
{
extern int wx1;
if(wx1>=0)