]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_shadow.c
rename R_MAX_OCCLUSION_QUERIES to MAX_OCCLUSION_QUERIES and move it to
[xonotic/darkplaces.git] / r_shadow.c
index 56bf1b858ee0d45040d5875176cf275ab155cf99..559bad0de9cc6a2a9761e371f3466f23395cd072 100644 (file)
@@ -345,7 +345,6 @@ typedef struct cubemapinfo_s
 }
 cubemapinfo_t;
 
-#define MAX_CUBEMAPS 256
 static int numcubemaps;
 static cubemapinfo_t cubemaps[MAX_CUBEMAPS];
 
@@ -4710,7 +4709,7 @@ void R_DrawCorona(rtlight_t *rtlight, float cscale, float scale)
                        qglBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT);
                }
                R_CalcSprite_Vertex3f(vertex3f, rtlight->shadoworigin, r_refdef.view.right, r_refdef.view.up, scale, -scale, -scale, scale);
-               RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, RENDER_NODEPTHTEST, 0, color[0], color[1], color[2], 1, 4, vertex3f, spritetexcoord2f, NULL, NULL, NULL, 2, polygonelement3i, polygonelement3s, false, false);
+               RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, RENDER_NODEPTHTEST, 0, color[0], color[1], color[2], 1, 4, vertex3f, spritetexcoord2f, NULL, NULL, NULL, NULL, 2, polygonelement3i, polygonelement3s, false, false);
                R_DrawCustomSurface(r_shadow_lightcorona, &identitymatrix, MATERIALFLAG_ADD | MATERIALFLAG_BLENDED | MATERIALFLAG_FULLBRIGHT | MATERIALFLAG_NOCULLFACE, 0, 4, 0, 2, false);
                if(negated)
                        qglBlendEquationEXT(GL_FUNC_ADD_EXT);
@@ -4743,11 +4742,11 @@ void R_DrawCoronas(void)
        {
                GL_ColorMask(0,0,0,0);
                if (r_maxqueries < (range + r_refdef.scene.numlights) * 2)
-               if (r_maxqueries < R_MAX_OCCLUSION_QUERIES)
+               if (r_maxqueries < MAX_OCCLUSION_QUERIES)
                {
                        i = r_maxqueries;
                        r_maxqueries = (range + r_refdef.scene.numlights) * 4;
-                       r_maxqueries = min(r_maxqueries, R_MAX_OCCLUSION_QUERIES);
+                       r_maxqueries = min(r_maxqueries, MAX_OCCLUSION_QUERIES);
                        CHECKGLERROR
                        qglGenQueriesARB(r_maxqueries - i, r_queries + i);
                        CHECKGLERROR
@@ -5037,7 +5036,7 @@ void R_Shadow_DrawCursor_TransparentCallback(const entity_render_t *ent, const r
        // this is never batched (there can be only one)
        float vertex3f[12];
        R_CalcSprite_Vertex3f(vertex3f, r_editlights_cursorlocation, r_refdef.view.right, r_refdef.view.up, EDLIGHTSPRSIZE, -EDLIGHTSPRSIZE, -EDLIGHTSPRSIZE, EDLIGHTSPRSIZE);
-       RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, 0, 0, 1, 1, 1, 1, 4, vertex3f, spritetexcoord2f, NULL, NULL, NULL, 2, polygonelement3i, polygonelement3s, false, false);
+       RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, 0, 0, 1, 1, 1, 1, 4, vertex3f, spritetexcoord2f, NULL, NULL, NULL, NULL, 2, polygonelement3i, polygonelement3s, false, false);
        R_DrawCustomSurface(r_editlights_sprcursor, &identitymatrix, MATERIALFLAG_NODEPTHTEST | MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED | MATERIALFLAG_FULLBRIGHT | MATERIALFLAG_NOCULLFACE, 0, 4, 0, 2, false);
 }
 
@@ -5073,13 +5072,13 @@ void R_Shadow_DrawLightSprite_TransparentCallback(const entity_render_t *ent, co
        else
                skinframe = r_editlights_sprlight;
 
-       RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, 0, 0, spritecolor[0], spritecolor[1], spritecolor[2], 1, 4, vertex3f, spritetexcoord2f, NULL, NULL, NULL, 2, polygonelement3i, polygonelement3s, false, false);
+       RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, 0, 0, spritecolor[0], spritecolor[1], spritecolor[2], 1, 4, vertex3f, spritetexcoord2f, NULL, NULL, NULL, NULL, 2, polygonelement3i, polygonelement3s, false, false);
        R_DrawCustomSurface(skinframe, &identitymatrix, MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED | MATERIALFLAG_FULLBRIGHT | MATERIALFLAG_NOCULLFACE, 0, 4, 0, 2, false);
 
        // draw selection sprite if light is selected
        if (light->selected)
        {
-               RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, 0, 0, 1, 1, 1, 1, 4, vertex3f, spritetexcoord2f, NULL, NULL, NULL, 2, polygonelement3i, polygonelement3s, false, false);
+               RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, 0, 0, 1, 1, 1, 1, 4, vertex3f, spritetexcoord2f, NULL, NULL, NULL, NULL, 2, polygonelement3i, polygonelement3s, false, false);
                R_DrawCustomSurface(r_editlights_sprselection, &identitymatrix, MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED | MATERIALFLAG_FULLBRIGHT | MATERIALFLAG_NOCULLFACE, 0, 4, 0, 2, false);
                // VorteX todo: add normalmode/realtime mode light overlay sprites?
        }