Adds pr_maxlightpasses cvar.

git-svn-id: https://svn.eduke32.com/eduke32@1293 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2009-04-01 18:52:15 +00:00
parent 82605aa44c
commit 68cad843f6
3 changed files with 6 additions and 6 deletions

View file

@ -33,7 +33,7 @@
# include <math.h> # include <math.h>
// CVARS // CVARS
extern int32_t pr_occlusionculling; extern int32_t pr_maxlightpasses;
extern int32_t pr_fov; extern int32_t pr_fov;
extern int32_t pr_billboardingmode; extern int32_t pr_billboardingmode;
extern int32_t pr_verbosity; extern int32_t pr_verbosity;

View file

@ -5,7 +5,7 @@
#include "polymer.h" #include "polymer.h"
// CVARS // CVARS
int32_t pr_occlusionculling = 50; int32_t pr_maxlightpasses = 5;
int32_t pr_fov = 426; // appears to be the classic setting. int32_t pr_fov = 426; // appears to be the classic setting.
int32_t pr_billboardingmode = 1; int32_t pr_billboardingmode = 1;
int32_t pr_verbosity = 1; // 0: silent, 1: errors and one-times, 2: multiple-times, 3: flood int32_t pr_verbosity = 1; // 0: silent, 1: errors and one-times, 2: multiple-times, 3: flood
@ -1436,7 +1436,7 @@ static void polymer_drawplane(_prplane* plane)
curlight = 0; curlight = 0;
while ((curlight == 0) || ((curlight < plane->lightcount) && (curlight < pr_occlusionculling))) while ((curlight == 0) || ((curlight < plane->lightcount) && (curlight < pr_maxlightpasses)))
{ {
materialbits = polymer_bindmaterial(plane->material, plane->lights, plane->lightcount); materialbits = polymer_bindmaterial(plane->material, plane->lights, plane->lightcount);
@ -3027,7 +3027,7 @@ static void polymer_drawmdsprite(spritetype *tspr)
bglBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, m->indices[surfi]); bglBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, m->indices[surfi]);
curlight = 0; curlight = 0;
while ((curlight == 0) || ((curlight < modellightcount) && (curlight < pr_occlusionculling))) while ((curlight == 0) || ((curlight < modellightcount) && (curlight < pr_maxlightpasses)))
{ {
materialbits = polymer_bindmaterial(mdspritematerial, modellights, modellightcount); materialbits = polymer_bindmaterial(mdspritematerial, modellights, modellightcount);
bglDrawElements(GL_TRIANGLES, s->numtris * 3, GL_UNSIGNED_INT, 0); bglDrawElements(GL_TRIANGLES, s->numtris * 3, GL_UNSIGNED_INT, 0);
@ -3052,7 +3052,7 @@ static void polymer_drawmdsprite(spritetype *tspr)
} }
curlight = 0; curlight = 0;
while ((curlight == 0) || ((curlight < modellightcount) && (curlight < pr_occlusionculling))) while ((curlight == 0) || ((curlight < modellightcount) && (curlight < pr_maxlightpasses)))
{ {
materialbits = polymer_bindmaterial(mdspritematerial, modellights, modellightcount); materialbits = polymer_bindmaterial(mdspritematerial, modellights, modellightcount);
bglDrawElements(GL_TRIANGLES, s->numtris * 3, GL_UNSIGNED_INT, s->tris); bglDrawElements(GL_TRIANGLES, s->numtris * 3, GL_UNSIGNED_INT, s->tris);

View file

@ -758,7 +758,7 @@ cvar_t cvars[] =
{ "r_projectionhack", "r_projectionhack: enable/disable projection hack", (void*)&glprojectionhacks, CVAR_INT, 0, 0, 2 }, { "r_projectionhack", "r_projectionhack: enable/disable projection hack", (void*)&glprojectionhacks, CVAR_INT, 0, 0, 2 },
# ifdef POLYMER # ifdef POLYMER
// polymer cvars // polymer cvars
{ "pr_occlusionculling", "pr_occlusionculling: insert description that noone will ever read", (void*)&pr_occlusionculling, CVAR_INT, 0, 0, 512 }, { "pr_maxlightpasses", "pr_maxlightpasses: the maximal amount of lights a single object can by affected by", (void*)&pr_maxlightpasses, CVAR_INT, 0, 0, 512 },
{ "pr_fov", "pr_fov: sets the field of vision in build angle", (void*)&pr_fov, CVAR_INT, 0, 0, 1023}, { "pr_fov", "pr_fov: sets the field of vision in build angle", (void*)&pr_fov, CVAR_INT, 0, 0, 1023},
{ "pr_billboardingmode", "pr_billboardingmode: face sprite display method. 0: classic mode; 1: polymost mode", (void*)&pr_billboardingmode, CVAR_INT, 0, 0, 1 }, { "pr_billboardingmode", "pr_billboardingmode: face sprite display method. 0: classic mode; 1: polymost mode", (void*)&pr_billboardingmode, CVAR_INT, 0, 0, 1 },
{ "pr_verbosity", "pr_verbosity: verbosity level of the polymer renderer", (void*)&pr_verbosity, CVAR_INT, 0, 0, 3 }, { "pr_verbosity", "pr_verbosity: verbosity level of the polymer renderer", (void*)&pr_verbosity, CVAR_INT, 0, 0, 3 },