ref: gl: avoid generating GL_INVALID_OPERATION if gl_vbo_dlightmode is set to 0
This commit is contained in:
parent
91a4ace12c
commit
eb09af0b08
1 changed files with 6 additions and 2 deletions
|
@ -2475,11 +2475,15 @@ static void R_SetupVBOArrayDlight( vboarray_t *vbo, texture_t *texture )
|
||||||
#define SPARSE_DECALS_UPLOAD 0
|
#define SPARSE_DECALS_UPLOAD 0
|
||||||
|
|
||||||
static void R_SetupVBOArrayDecalDlight( int decalcount )
|
static void R_SetupVBOArrayDecalDlight( int decalcount )
|
||||||
|
{
|
||||||
|
if( vbos.decal_dlight_vbo )
|
||||||
{
|
{
|
||||||
pglBindBufferARB( GL_ARRAY_BUFFER_ARB, vbos.decal_dlight_vbo );
|
pglBindBufferARB( GL_ARRAY_BUFFER_ARB, vbos.decal_dlight_vbo );
|
||||||
#if !SPARSE_DECALS_UPLOAD
|
#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
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
R_SetDecalMode( true );
|
R_SetDecalMode( true );
|
||||||
// hack: fix decal dlights on gl_vbo_details == 2 (wrong state??)
|
// hack: fix decal dlights on gl_vbo_details == 2 (wrong state??)
|
||||||
/*if( mtst.details_enabled && mtst.tmu_dt != -1 )
|
/*if( mtst.details_enabled && mtst.tmu_dt != -1 )
|
||||||
|
|
Loading…
Add table
Reference in a new issue