]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
Added vid_vsync cvar and also to put it in the video options menu.
[xonotic/darkplaces.git] / gl_rmain.c
index 53f424335d6c7db7f30beac5b9747766d80d1c45..79b6ab244e8f8e516173bf72340858e248beafd3 100644 (file)
@@ -626,11 +626,13 @@ void R_RenderView(void)
        r_view_fov_x = bound(1, r_refdef.fov_x, 170);
        r_view_fov_y = bound(1, r_refdef.fov_y, 170);
        r_view_matrix = r_refdef.viewentitymatrix;
+       GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 1);
 
        // GL is weird because it's bottom to top, r_view_y is top to bottom
        qglViewport(r_view_x, vid.realheight - (r_view_y + r_view_height), r_view_width, r_view_height);
        GL_Scissor(r_view_x, r_view_y, r_view_width, r_view_height);
        GL_ScissorTest(true);
+       GL_DepthMask(true);
        R_ClearScreen();
        R_TimeReport("setup");
 
@@ -661,6 +663,8 @@ void R_RenderScene(void)
 
        r_framecount++;
 
+       R_MeshQueue_BeginScene();
+
        GL_ShowTrisColor(0.05, 0.05, 0.05, 1);
 
        R_SetFrustum();
@@ -684,8 +688,6 @@ void R_RenderScene(void)
        R_MarkEntities();
        R_TimeReport("markentity");
 
-       R_MeshQueue_BeginScene();
-
        R_Shadow_UpdateWorldLightSelection();
 
        // don't let sound skip if going slow