mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 05:41:46 +08:00
ref: implement API interface for ref_gl, get rid of RenderAPI, RenderInterface and vgui_support API references
This commit is contained in:
@@ -617,10 +617,19 @@ void SV_RestartDecals( void )
|
||||
|
||||
// g-cont. add space for studiodecals if present
|
||||
host.decalList = (decallist_t *)Z_Calloc( sizeof( decallist_t ) * MAX_RENDER_DECALS * 2 );
|
||||
host.numdecals = ref.dllFuncs.R_CreateDecalList( host.decalList );
|
||||
|
||||
// remove decals from map
|
||||
ref.dllFuncs.R_ClearAllDecals();
|
||||
if( ref.dllFuncs.R_CreateDecalList )
|
||||
{
|
||||
host.numdecals = ref.dllFuncs.R_CreateDecalList( host.decalList );
|
||||
|
||||
// remove decals from map
|
||||
ref.dllFuncs.R_ClearAllDecals();
|
||||
}
|
||||
else
|
||||
{
|
||||
// we probably running a dedicated server
|
||||
host.numdecals = 0;
|
||||
}
|
||||
|
||||
// write decals into reliable datagram
|
||||
msg = SV_GetReliableDatagram();
|
||||
|
||||
@@ -2005,7 +2005,7 @@ const char* pfnGetModelName( int modelindex )
|
||||
|
||||
static const byte *GL_TextureData( unsigned int texnum )
|
||||
{
|
||||
return RefRenderAPI->GL_TextureData( texnum );
|
||||
return ref.dllFuncs.GL_TextureData( texnum );
|
||||
}
|
||||
|
||||
static server_physics_api_t gPhysicsAPI =
|
||||
|
||||
@@ -1130,7 +1130,15 @@ static void SaveClientState( SAVERESTOREDATA *pSaveData, const char *level, int
|
||||
decalList = (decallist_t *)Z_Calloc( sizeof( decallist_t ) * MAX_RENDER_DECALS * 2 );
|
||||
|
||||
// initialize client header
|
||||
header.decalCount = ref.dllFuncs.R_CreateDecalList( decalList );
|
||||
if( ref.dllFuncs.R_CreateDecalList )
|
||||
{
|
||||
header.decalCount = ref.dllFuncs.R_CreateDecalList( decalList );
|
||||
}
|
||||
else
|
||||
{
|
||||
// we probably running a dedicated server
|
||||
header.decalCount = 0;
|
||||
}
|
||||
header.entityCount = sv.num_static_entities;
|
||||
|
||||
if( !changelevel )
|
||||
|
||||
Reference in New Issue
Block a user