]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.c
merged q1bsp and q3bsp surface rendering
[xonotic/darkplaces.git] / gl_backend.c
index ff102b3edc0b934fadf20132fcab09c4f226d6cf..0fa1f802c4cb6f6e6e3fc56de47947a18b4d0ca6 100644 (file)
@@ -832,7 +832,17 @@ unsigned int GL_Backend_CompileProgram(int vertexstrings_count, const char **ver
        qglGetObjectParameterivARB(programobject, GL_OBJECT_LINK_STATUS_ARB, &programlinked);
        qglGetInfoLogARB(programobject, sizeof(compilelog), NULL, compilelog);
        if (compilelog[0])
+       {
                Con_Printf("program link log:\n%s\n", compilelog);
+               // software vertex shader is ok but software fragment shader is WAY
+               // too slow, fail program if so.
+               // NOTE: this string might be ATI specific, but that's ok because the
+               // ATI R300 chip (Radeon 9500-9800/X300) is the most likely to use a
+               // software fragment shader due to low instruction and dependent
+               // texture limits.
+               if (strstr(compilelog, "fragment shader will run in software"))
+                       programlinked = false;
+       }
        CHECKGLERROR
        if (!programlinked)
        {
@@ -1463,8 +1473,8 @@ void SCR_DrawScreen (void)
                        }
 
                        // LordHavoc: viewzoom (zoom in for sniper rifles, etc)
-                       r_refdef.fov_x = scr_fov.value * cl.viewzoom * r_refdef.fovscale_x;
-                       r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.width, r_refdef.height) * r_refdef.fovscale_y;
+                       r_refdef.fov_x = scr_fov.value * r_refdef.fovscale_x;
+                       r_refdef.fov_y = CalcFov (scr_fov.value, r_refdef.width, r_refdef.height) * r_refdef.fovscale_y;
 
                        R_RenderView();
 
@@ -1477,7 +1487,7 @@ void SCR_DrawScreen (void)
                                r_refdef.x = (vid.realwidth - r_refdef.width)/2;
                                r_refdef.y = 0;
                                r_refdef.fov_x = scr_zoomwindow_fov.value * r_refdef.fovscale_x;
-                               r_refdef.fov_y = CalcFov(r_refdef.fov_x, r_refdef.width, r_refdef.height) * r_refdef.fovscale_y;
+                               r_refdef.fov_y = CalcFov(scr_zoomwindow_fov.value, r_refdef.width, r_refdef.height) * r_refdef.fovscale_y;
 
                                R_RenderView();
                        }