mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
ref: gl: avoid generating GL_INVALID_OPERATION if gl_vbo_dlightmode is set to 0
This commit is contained in:
@@ -2476,10 +2476,14 @@ static void R_SetupVBOArrayDlight( vboarray_t *vbo, texture_t *texture )
|
||||
|
||||
static void R_SetupVBOArrayDecalDlight( int decalcount )
|
||||
{
|
||||
pglBindBufferARB( GL_ARRAY_BUFFER_ARB, vbos.decal_dlight_vbo );
|
||||
if( vbos.decal_dlight_vbo )
|
||||
{
|
||||
pglBindBufferARB( GL_ARRAY_BUFFER_ARB, vbos.decal_dlight_vbo );
|
||||
#if !SPARSE_DECALS_UPLOAD
|
||||
pglBufferDataARB( GL_ARRAY_BUFFER_ARB, sizeof( vbovertex_t ) * DECAL_VERTS_MAX * decalcount, vbos.decal_dlight , GL_STREAM_DRAW_ARB );
|
||||
pglBufferDataARB( GL_ARRAY_BUFFER_ARB, sizeof( vbovertex_t ) * DECAL_VERTS_MAX * decalcount, vbos.decal_dlight, GL_STREAM_DRAW_ARB );
|
||||
#endif
|
||||
}
|
||||
|
||||
R_SetDecalMode( true );
|
||||
// hack: fix decal dlights on gl_vbo_details == 2 (wrong state??)
|
||||
/*if( mtst.details_enabled && mtst.tmu_dt != -1 )
|
||||
|
||||
Reference in New Issue
Block a user