Browse Source

ref: get rid of R_IncrementSpeedsCounter

pull/2/head
Alibek Omarov 6 years ago
parent
commit
7d8b63fd88
  1. 3
      engine/client/cl_tent.c
  2. 1
      engine/ref_api.h
  3. 13
      ref_gl/gl_context.c
  4. 10
      ref_gl/gl_rmain.c

3
engine/client/cl_tent.c

@ -401,8 +401,7 @@ int CL_TempEntAddEntity( cl_entity_t *pEntity ) @@ -401,8 +401,7 @@ int CL_TempEntAddEntity( cl_entity_t *pEntity )
VectorCopy( pEntity->origin, pEntity->latched.prevorigin );
// add to list
if( CL_AddVisibleEntity( pEntity, ET_TEMPENTITY ))
ref.dllFuncs.R_IncrementSpeedsCounter( RS_ACTIVE_TENTS );
CL_AddVisibleEntity( pEntity, ET_TEMPENTITY );
return 1;
}

1
engine/ref_api.h

@ -466,7 +466,6 @@ typedef struct ref_interface_s @@ -466,7 +466,6 @@ typedef struct ref_interface_s
// debug
void (*R_ShowTextures)( void );
void (*R_ShowTree)( void );
void (*R_IncrementSpeedsCounter)( int counterType );
// texture management
const byte *(*R_GetTextureOriginalBuffer)( unsigned int idx ); // not always available

13
ref_gl/gl_context.c

@ -25,18 +25,6 @@ static void R_ClearScreen( void ) @@ -25,18 +25,6 @@ static void R_ClearScreen( void )
pglClear( GL_COLOR_BUFFER_BIT );
}
static void R_IncrementSpeedsCounter( int type )
{
switch( type )
{
case RS_ACTIVE_TENTS:
r_stats.c_active_tents_count++;
break;
default:
gEngfuncs.Host_Error( "R_IncrementSpeedsCounter: unsupported type %d\n", type );
}
}
static const byte *R_GetTextureOriginalBuffer( unsigned int idx )
{
gl_texture_t *glt = R_GetTexture( idx );
@ -370,7 +358,6 @@ ref_interface_t gReffuncs = @@ -370,7 +358,6 @@ ref_interface_t gReffuncs =
R_ShowTextures,
R_ShowTree,
R_IncrementSpeedsCounter,
R_GetTextureOriginalBuffer,
GL_LoadTextureFromBuffer,

10
ref_gl/gl_rmain.c

@ -249,8 +249,16 @@ qboolean R_AddEntity( struct cl_entity_s *clent, int type ) @@ -249,8 +249,16 @@ qboolean R_AddEntity( struct cl_entity_s *clent, int type )
if( !R_ModelOpaque( clent->curstate.rendermode ) && CL_FxBlend( clent ) <= 0 )
return true; // invisible
if( type == ET_FRAGMENTED )
switch( type )
{
case ET_FRAGMENTED:
r_stats.c_client_ents++;
break;
case ET_TEMPENTITY:
r_stats.c_active_tents_count++;
break;
default: break;
}
if( R_OpaqueEntity( clent ))
{

Loading…
Cancel
Save