]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
added r_depthfirst option which defaults to 1 (render depth of world
[xonotic/darkplaces.git] / gl_rsurf.c
index 1927aa226c8edf8026e2537d3907294bcd6c7b4c..0cc320018e7401d9a4641a6195f9efc7a68f04a7 100644 (file)
@@ -509,9 +509,9 @@ void R_Q1BSP_DrawSky(entity_render_t *ent)
        if (ent->model == NULL)
                return;
        if (ent == r_refdef.worldentity)
-               R_DrawWorldSurfaces(true);
+               R_DrawWorldSurfaces(true, true, false);
        else
-               R_DrawModelSurfaces(ent, true);
+               R_DrawModelSurfaces(ent, true, true, false);
 }
 
 void R_Q1BSP_Draw(entity_render_t *ent)
@@ -520,9 +520,20 @@ void R_Q1BSP_Draw(entity_render_t *ent)
        if (model == NULL)
                return;
        if (ent == r_refdef.worldentity)
-               R_DrawWorldSurfaces(false);
+               R_DrawWorldSurfaces(false, true, false);
        else
-               R_DrawModelSurfaces(ent, false);
+               R_DrawModelSurfaces(ent, false, true, false);
+}
+
+void R_Q1BSP_DrawDepth(entity_render_t *ent)
+{
+       model_t *model = ent->model;
+       if (model == NULL)
+               return;
+       if (ent == r_refdef.worldentity)
+               R_DrawWorldSurfaces(false, false, true);
+       else
+               R_DrawModelSurfaces(ent, false, false, true);
 }
 
 typedef struct r_q1bsp_getlightinfo_s