mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 16:18:01 +00:00
ref_gl: fix not restoring static lightmap after decals
This commit is contained in:
parent
9a1717915c
commit
74946100f1
@ -2284,7 +2284,7 @@ void R_SetupVBOArrayStatic( vboarray_t *vbo, qboolean drawlightmap, qboolean dra
|
|||||||
pglEnableClientState( GL_VERTEX_ARRAY );
|
pglEnableClientState( GL_VERTEX_ARRAY );
|
||||||
pglVertexPointer( 3, GL_FLOAT, sizeof( vbovertex_t ), (void*)offsetof(vbovertex_t,pos) );
|
pglVertexPointer( 3, GL_FLOAT, sizeof( vbovertex_t ), (void*)offsetof(vbovertex_t,pos) );
|
||||||
}
|
}
|
||||||
vboarray.astate = VBO_ARRAY_STATIC;
|
|
||||||
|
|
||||||
// setup multitexture
|
// setup multitexture
|
||||||
if( drawtextures && vboarray.tstate != VBO_TEXTURE_MAIN )
|
if( drawtextures && vboarray.tstate != VBO_TEXTURE_MAIN )
|
||||||
@ -2297,7 +2297,7 @@ void R_SetupVBOArrayStatic( vboarray_t *vbo, qboolean drawlightmap, qboolean dra
|
|||||||
vboarray.tstate = VBO_TEXTURE_MAIN;
|
vboarray.tstate = VBO_TEXTURE_MAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( drawlightmap && vboarray.lstate != VBO_LIGHTMAP_STATIC )
|
if( drawlightmap && (vboarray.lstate != VBO_LIGHTMAP_STATIC || vboarray.astate == VBO_ARRAY_DECAL ) )
|
||||||
{
|
{
|
||||||
// set lightmap texenv
|
// set lightmap texenv
|
||||||
if( mtst.lm )
|
if( mtst.lm )
|
||||||
@ -2309,6 +2309,7 @@ void R_SetupVBOArrayStatic( vboarray_t *vbo, qboolean drawlightmap, qboolean dra
|
|||||||
R_SetLightmap();
|
R_SetLightmap();
|
||||||
vboarray.lstate = VBO_LIGHTMAP_STATIC;
|
vboarray.lstate = VBO_LIGHTMAP_STATIC;
|
||||||
}
|
}
|
||||||
|
vboarray.astate = VBO_ARRAY_STATIC;
|
||||||
R_SetDecalMode( false );
|
R_SetDecalMode( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user