]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.c
Replaced all calls to str[n]cat and strncpy by calls to strlcat and strlcpy respectively
[xonotic/darkplaces.git] / gl_backend.c
index 4bea75d78ffdb674e3f2b4bffd0a12b9f96b8f8c..348dd65567082291e4f82062f34d1f69d81dc30c 100644 (file)
@@ -263,9 +263,6 @@ void GL_SetupView_Mode_Perspective (double frustumx, double frustumy, double zNe
 {
        double m[16];
 
-       if (!r_render.integer)
-               return;
-
        // set up viewpoint
        CHECKGLERROR
        qglMatrixMode(GL_PROJECTION);CHECKGLERROR
@@ -298,9 +295,6 @@ void GL_SetupView_Mode_PerspectiveInfiniteFarClip (double frustumx, double frust
 {
        double nudge, m[16];
 
-       if (!r_render.integer)
-               return;
-
        // set up viewpoint
        CHECKGLERROR
        qglMatrixMode(GL_PROJECTION);CHECKGLERROR
@@ -349,9 +343,6 @@ void GL_SetupView_Mode_Ortho (double x1, double y1, double x2, double y2, double
 {
        double m[16];
 
-       if (!r_render.integer)
-               return;
-
        // set up viewpoint
        CHECKGLERROR
        qglMatrixMode(GL_PROJECTION);CHECKGLERROR
@@ -736,7 +727,7 @@ void GL_TransformToScreen(const vec4_t in, vec4_t out)
        Matrix4x4_Transform4 (&backend_projectmatrix, temp, out);
        iw = 1.0f / out[3];
        out[0] = r_view.x + (out[0] * iw + 1.0f) * r_view.width * 0.5f;
-       out[1] = r_view.y + (out[1] * iw + 1.0f) * r_view.height * 0.5f;
+       out[1] = r_view.y + r_view.height - (out[1] * iw + 1.0f) * r_view.height * 0.5f;
        out[2] = r_view.z + (out[2] * iw + 1.0f) * r_view.depth * 0.5f;
 }