Fix some q2/rtlight issues.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3772 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2011-04-20 03:31:41 +00:00
parent a39d6740c5
commit 253048dd0b
3 changed files with 8 additions and 2 deletions

View file

@ -2570,6 +2570,7 @@ void GLBE_SelectMode(backendmode_t mode, unsigned int flags)
#ifdef RTLIGHTS #ifdef RTLIGHTS
if (mode == BEM_STENCIL) if (mode == BEM_STENCIL)
{ {
GL_DeSelectProgram();
/*BEM_STENCIL doesn't support mesh writing*/ /*BEM_STENCIL doesn't support mesh writing*/
qglDisableClientState(GL_COLOR_ARRAY); qglDisableClientState(GL_COLOR_ARRAY);
//disable all tmus //disable all tmus
@ -2591,6 +2592,7 @@ void GLBE_SelectMode(backendmode_t mode, unsigned int flags)
#endif #endif
if (mode == BEM_DEPTHONLY) if (mode == BEM_DEPTHONLY)
{ {
GL_DeSelectProgram();
/*BEM_DEPTHONLY does support mesh writing, but its not the only way its used... FIXME!*/ /*BEM_DEPTHONLY does support mesh writing, but its not the only way its used... FIXME!*/
qglDisableClientState(GL_COLOR_ARRAY); qglDisableClientState(GL_COLOR_ARRAY);
while(shaderstate.lastpasstmus>0) while(shaderstate.lastpasstmus>0)

View file

@ -3460,17 +3460,19 @@ void Shader_DefaultBSPQ2(char *shortname, shader_t *s, const void *args)
{ {
Shader_DefaultScript(shortname, s, Shader_DefaultScript(shortname, s,
"{\n" "{\n"
"surfaceparm nodlight\n"
"skyparms - - -\n" "skyparms - - -\n"
"}\n" "}\n"
); );
} }
else if (!strncmp(shortname, "warp/", 7)) else if (!strncmp(shortname, "warp/", 5))
{ {
Shader_DefaultScript(shortname, s, Shader_DefaultScript(shortname, s,
"{\n" "{\n"
"program defaultwarp\n"
"{\n" "{\n"
"map $diffuse\n" "map $diffuse\n"
"tcmod turb 0 0.01 0.5 0\n" "tcmod turb 0 0 3 0.1\n"
"}\n" "}\n"
"}\n" "}\n"
); );

View file

@ -1610,6 +1610,8 @@ static void Sh_DrawEntLighting(dlight_t *light, vec3_t colour)
if (!sm->litsurfs[tno].count) if (!sm->litsurfs[tno].count)
continue; continue;
tex = cl.worldmodel->textures[tno]; tex = cl.worldmodel->textures[tno];
if (tex->shader->flags & SHADER_NODLIGHT)
continue;
BE_DrawMesh_List(tex->shader, sm->litsurfs[tno].count, sm->litsurfs[tno].s, &tex->vbo, &tex->shader->defaulttextures); BE_DrawMesh_List(tex->shader, sm->litsurfs[tno].count, sm->litsurfs[tno].s, &tex->vbo, &tex->shader->defaulttextures);
} }