mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 16:18:01 +00:00
ref_gl: vbo: fix lightmap0 processing, remove ilightmap
This commit is contained in:
parent
74e09ddb12
commit
3bb7471fd3
@ -1795,7 +1795,6 @@ static struct arraystate_s
|
|||||||
enum texture_state_e tstate;
|
enum texture_state_e tstate;
|
||||||
enum lightmap_state_e lstate;
|
enum lightmap_state_e lstate;
|
||||||
int itexture;
|
int itexture;
|
||||||
int ilightmap;
|
|
||||||
qboolean decal_mode;
|
qboolean decal_mode;
|
||||||
} vboarray;
|
} vboarray;
|
||||||
|
|
||||||
@ -2248,13 +2247,14 @@ void R_SetupVBOArrayStatic( vboarray_t *vbo, qboolean drawlightmap, qboolean dra
|
|||||||
if( drawlightmap && vboarray.lstate != VBO_LIGHTMAP_STATIC )
|
if( drawlightmap && vboarray.lstate != VBO_LIGHTMAP_STATIC )
|
||||||
{
|
{
|
||||||
// set lightmap texenv
|
// set lightmap texenv
|
||||||
if( vboarray.ilightmap )
|
if( mtst.lm )
|
||||||
GL_Bind( mtst.tmu_lm = XASH_TEXTURE1, tr.lightmapTextures[vboarray.ilightmap] );
|
GL_Bind( mtst.tmu_lm = XASH_TEXTURE1, mtst.lm );
|
||||||
else
|
else
|
||||||
GL_SelectTexture( mtst.tmu_lm = XASH_TEXTURE1 );
|
GL_SelectTexture( mtst.tmu_lm = XASH_TEXTURE1 );
|
||||||
pglEnable( GL_TEXTURE_2D );
|
pglEnable( GL_TEXTURE_2D );
|
||||||
pglEnableClientState( GL_TEXTURE_COORD_ARRAY );
|
pglEnableClientState( GL_TEXTURE_COORD_ARRAY );
|
||||||
R_SetLightmap();
|
R_SetLightmap();
|
||||||
|
vboarray.lstate = VBO_LIGHTMAP_STATIC;
|
||||||
}
|
}
|
||||||
R_SetDecalMode( false );
|
R_SetDecalMode( false );
|
||||||
}
|
}
|
||||||
@ -2910,7 +2910,6 @@ void R_ClearVBOState( qboolean drawlightmap, qboolean drawtextures )
|
|||||||
vboarray.tstate = VBO_TEXTURE_NONE;
|
vboarray.tstate = VBO_TEXTURE_NONE;
|
||||||
vboarray.lstate = VBO_LIGHTMAP_NONE;
|
vboarray.lstate = VBO_LIGHTMAP_NONE;
|
||||||
vboarray.itexture = 0;
|
vboarray.itexture = 0;
|
||||||
vboarray.ilightmap = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2958,7 +2957,6 @@ void R_DrawVBO( qboolean drawlightmap, qboolean drawtextures )
|
|||||||
if( drawlightmap )
|
if( drawlightmap )
|
||||||
{
|
{
|
||||||
GL_Bind( mtst.tmu_lm, mtst.lm = tr.lightmapTextures[k] );
|
GL_Bind( mtst.tmu_lm, mtst.lm = tr.lightmapTextures[k] );
|
||||||
vboarray.ilightmap = k;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for( j = vbos.mintexture; j < vbos.maxtexture; j++ )
|
for( j = vbos.mintexture; j < vbos.maxtexture; j++ )
|
||||||
|
Loading…
Reference in New Issue
Block a user