engine: client: make R_GetTextureParms inlined

This commit is contained in:
Alibek Omarov 2024-11-23 15:02:13 +03:00
parent 689e29bc42
commit bf6a9cb0e7
2 changed files with 6 additions and 7 deletions

View file

@ -45,12 +45,6 @@ REF_HOST_CHECK( realtime );
REF_HOST_CHECK( frametime );
REF_HOST_CHECK( features );
void R_GetTextureParms( int *w, int *h, int texnum )
{
if( w ) *w = REF_GET_PARM( PARM_TEX_WIDTH, texnum );
if( h ) *h = REF_GET_PARM( PARM_TEX_HEIGHT, texnum );
}
static qboolean CheckSkybox( const char *name, char out[SKYBOX_MAX_SIDES][MAX_STRING] )
{
static const char *skybox_ext[3] = { "dds", "tga", "bmp" };

View file

@ -36,12 +36,17 @@ extern struct ref_state_s ref;
extern ref_globals_t refState;
// handy API wrappers
void R_GetTextureParms( int *w, int *h, int texnum );
#define REF_GET_PARM( parm, arg ) ref.dllFuncs.RefGetParm( (parm), (arg) )
#define GL_LoadTextureInternal( name, pic, flags ) ref.dllFuncs.GL_LoadTextureFromBuffer( (name), (pic), (flags), false )
#define GL_UpdateTextureInternal( name, pic, flags ) ref.dllFuncs.GL_LoadTextureFromBuffer( (name), (pic), (flags), true )
#define R_GetBuiltinTexture( name ) ref.dllFuncs.GL_LoadTexture( (name), 0, 0, 0 )
static inline void R_GetTextureParms( int *w, int *h, int texnum )
{
if( w ) *w = REF_GET_PARM( PARM_TEX_WIDTH, texnum );
if( h ) *h = REF_GET_PARM( PARM_TEX_HEIGHT, texnum );
}
void GL_RenderFrame( const struct ref_viewpass_s *rvp );
void R_SetupSky( const char *name );