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:
parent
a39d6740c5
commit
253048dd0b
3 changed files with 8 additions and 2 deletions
|
@ -2570,6 +2570,7 @@ void GLBE_SelectMode(backendmode_t mode, unsigned int flags)
|
|||
#ifdef RTLIGHTS
|
||||
if (mode == BEM_STENCIL)
|
||||
{
|
||||
GL_DeSelectProgram();
|
||||
/*BEM_STENCIL doesn't support mesh writing*/
|
||||
qglDisableClientState(GL_COLOR_ARRAY);
|
||||
//disable all tmus
|
||||
|
@ -2591,6 +2592,7 @@ void GLBE_SelectMode(backendmode_t mode, unsigned int flags)
|
|||
#endif
|
||||
if (mode == BEM_DEPTHONLY)
|
||||
{
|
||||
GL_DeSelectProgram();
|
||||
/*BEM_DEPTHONLY does support mesh writing, but its not the only way its used... FIXME!*/
|
||||
qglDisableClientState(GL_COLOR_ARRAY);
|
||||
while(shaderstate.lastpasstmus>0)
|
||||
|
|
|
@ -3460,17 +3460,19 @@ void Shader_DefaultBSPQ2(char *shortname, shader_t *s, const void *args)
|
|||
{
|
||||
Shader_DefaultScript(shortname, s,
|
||||
"{\n"
|
||||
"surfaceparm nodlight\n"
|
||||
"skyparms - - -\n"
|
||||
"}\n"
|
||||
);
|
||||
}
|
||||
else if (!strncmp(shortname, "warp/", 7))
|
||||
else if (!strncmp(shortname, "warp/", 5))
|
||||
{
|
||||
Shader_DefaultScript(shortname, s,
|
||||
"{\n"
|
||||
"program defaultwarp\n"
|
||||
"{\n"
|
||||
"map $diffuse\n"
|
||||
"tcmod turb 0 0.01 0.5 0\n"
|
||||
"tcmod turb 0 0 3 0.1\n"
|
||||
"}\n"
|
||||
"}\n"
|
||||
);
|
||||
|
|
|
@ -1610,6 +1610,8 @@ static void Sh_DrawEntLighting(dlight_t *light, vec3_t colour)
|
|||
if (!sm->litsurfs[tno].count)
|
||||
continue;
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue