]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
I guess those glLoadIdentity calls were more important than expected
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 Dec 2002 03:06:44 +0000 (03:06 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 Dec 2002 03:06:44 +0000 (03:06 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2680 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c
glquake.h
vid_shared.c

index d61fcef75ea7d261bdb4f1f8cf9591e5c27560d4..a206d951a0b1f0cbd4af1f806c140d857df334fe 100644 (file)
@@ -249,6 +249,7 @@ void GL_SetupView_Mode_Perspective (double fovx, double fovy, double zNear, doub
 
        // set up viewpoint
        qglMatrixMode(GL_PROJECTION);CHECKGLERROR
+       qglLoadIdentity();CHECKGLERROR
        // pyramid slopes
        xmax = zNear * tan(fovx * M_PI / 360.0);
        ymax = zNear * tan(fovy * M_PI / 360.0);
@@ -267,6 +268,7 @@ void GL_SetupView_Mode_PerspectiveInfiniteFarClip (double fovx, double fovy, dou
 
        // set up viewpoint
        qglMatrixMode(GL_PROJECTION);CHECKGLERROR
+       qglLoadIdentity();CHECKGLERROR
        // set view pyramid
        nudge = 1.0 - 1.0 / (1<<23);
        m[ 0] = 1.0 / tan(fovx * M_PI / 360.0);
@@ -313,6 +315,7 @@ void GL_SetupView_Mode_Ortho (double x1, double y1, double x2, double y2, double
 
        // set up viewpoint
        qglMatrixMode(GL_PROJECTION);CHECKGLERROR
+       qglLoadIdentity();CHECKGLERROR
        qglOrtho(x1, x2, y2, y1, zNear, zFar);
        qglMatrixMode(GL_MODELVIEW);CHECKGLERROR
        GL_SetupView_Orientation_Identity();
index ee2c8d1e65bc282ef3e3b4775a450dcb5522b381..ee2fb7a9b3f3c139019090ae64d38994ed06a517 100644 (file)
--- a/glquake.h
+++ b/glquake.h
@@ -404,7 +404,7 @@ extern void (GLAPIENTRY *qglFrustum)(GLdouble left, GLdouble right, GLdouble bot
 extern void (GLAPIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height);
 //extern void (GLAPIENTRY *qglPushMatrix)(void);
 //extern void (GLAPIENTRY *qglPopMatrix)(void);
-//extern void (GLAPIENTRY *qglLoadIdentity)(void);
+extern void (GLAPIENTRY *qglLoadIdentity)(void);
 //extern void (GLAPIENTRY *qglLoadMatrixd)(const GLdouble *m);
 extern void (GLAPIENTRY *qglLoadMatrixf)(const GLfloat *m);
 //extern void (GLAPIENTRY *qglMultMatrixd)(const GLdouble *m);
index f711424d694479de713b7100e72dd31a0da5b8df..24bb5d62f762e74366e2a270dff11dfc8d2aea15 100644 (file)
@@ -127,7 +127,7 @@ void (GLAPIENTRY *qglFrustum)(GLdouble left, GLdouble right, GLdouble bottom, GL
 void (GLAPIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height);
 //void (GLAPIENTRY *qglPushMatrix)(void);
 //void (GLAPIENTRY *qglPopMatrix)(void);
-//void (GLAPIENTRY *qglLoadIdentity)(void);
+void (GLAPIENTRY *qglLoadIdentity)(void);
 //void (GLAPIENTRY *qglLoadMatrixd)(const GLdouble *m);
 void (GLAPIENTRY *qglLoadMatrixf)(const GLfloat *m);
 //void (GLAPIENTRY *qglMultMatrixd)(const GLdouble *m);
@@ -269,7 +269,7 @@ static dllfunction_t opengl110funcs[] =
        {"glViewport", (void **) &qglViewport},
 //     {"glPushMatrix", (void **) &qglPushMatrix},
 //     {"glPopMatrix", (void **) &qglPopMatrix},
-//     {"glLoadIdentity", (void **) &qglLoadIdentity},
+       {"glLoadIdentity", (void **) &qglLoadIdentity},
 //     {"glLoadMatrixd", (void **) &qglLoadMatrixd},
        {"glLoadMatrixf", (void **) &qglLoadMatrixf},
 //     {"glMultMatrixd", (void **) &qglMultMatrixd},