extern const entity_render_t *rsurface_entity;
extern const model_t *rsurface_model;
extern texture_t *rsurface_texture;
-extern rtexture_t *rsurface_lightmaptexture;
-extern rtexture_t *rsurface_deluxemaptexture;
+extern qboolean rsurface_uselightmaptexture;
extern rsurfmode_t rsurface_mode;
void RSurf_ActiveWorldEntity(void);
void R_UpdateTextureInfo(const entity_render_t *ent, texture_t *t);
void R_UpdateAllTextureInfo(entity_render_t *ent);
void R_QueueTextureSurfaceList(int texturenumsurfaces, msurface_t **texturesurfacelist);
-void R_DrawWorldSurfaces(qboolean skysurfaces);
-void R_DrawModelSurfaces(entity_render_t *ent, qboolean skysurfaces);
+void R_DrawWorldSurfaces(qboolean skysurfaces, qboolean writedepth, qboolean depthonly);
+void R_DrawModelSurfaces(entity_render_t *ent, qboolean skysurfaces, qboolean writedepth, qboolean depthonly);
void RSurf_PrepareVerticesForBatch(qboolean generatenormals, qboolean generatetangents, int texturenumsurfaces, msurface_t **texturesurfacelist);
void RSurf_DrawBatch_Simple(int texturenumsurfaces, msurface_t **texturesurfacelist);