mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: draft new RefAPI 14: remove reserved functions from render api, remove CL_AddCustomBeam
This commit is contained in:
@@ -151,28 +151,6 @@ qboolean R_BeamCull( const vec3_t start, const vec3_t end, qboolean pvsOnly )
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
CL_AddCustomBeam
|
||||
|
||||
Add the beam that encoded as custom entity
|
||||
================
|
||||
*/
|
||||
void CL_AddCustomBeam( cl_entity_t *pEnvBeam )
|
||||
{
|
||||
if( tr.draw_list->num_beam_entities >= MAX_VISIBLE_PACKET )
|
||||
{
|
||||
gEngfuncs.Con_Printf( S_ERROR "Too many beams %d!\n", tr.draw_list->num_beam_entities );
|
||||
return;
|
||||
}
|
||||
|
||||
if( pEnvBeam )
|
||||
{
|
||||
tr.draw_list->beam_entities[tr.draw_list->num_beam_entities] = pEnvBeam;
|
||||
tr.draw_list->num_beam_entities++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
==============================================================
|
||||
|
||||
@@ -452,7 +452,6 @@ static const ref_interface_t gReffuncs =
|
||||
GL_SetRenderMode,
|
||||
|
||||
R_AddEntity,
|
||||
CL_AddCustomBeam,
|
||||
R_ProcessEntData,
|
||||
R_Flush,
|
||||
|
||||
@@ -531,8 +530,6 @@ static const ref_interface_t gReffuncs =
|
||||
GL_TextureTarget,
|
||||
GL_SetTexCoordArrayMode,
|
||||
GL_UpdateTexSize,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
CL_DrawParticlesExternal,
|
||||
R_LightVec,
|
||||
|
||||
@@ -538,7 +538,6 @@ int R_CreateDecalList( decallist_t *pList );
|
||||
void R_ClearAllDecals( void );
|
||||
byte *Mod_GetCurrentVis( void );
|
||||
void Mod_SetOrthoBounds( const float *mins, const float *maxs );
|
||||
void CL_AddCustomBeam( cl_entity_t *pEnvBeam );
|
||||
|
||||
//
|
||||
// gl_opengl.c
|
||||
|
||||
@@ -243,9 +243,6 @@ qboolean R_AddEntity( struct cl_entity_s *clent, int type )
|
||||
if( !r_drawentities->value )
|
||||
return false; // not allow to drawing
|
||||
|
||||
if( !clent || !clent->model )
|
||||
return false; // if set to invisible, skip
|
||||
|
||||
if( FBitSet( clent->curstate.effects, EF_NODRAW ))
|
||||
return false; // done
|
||||
|
||||
@@ -260,10 +257,22 @@ qboolean R_AddEntity( struct cl_entity_s *clent, int type )
|
||||
case ET_TEMPENTITY:
|
||||
r_stats.c_active_tents_count++;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if( R_OpaqueEntity( clent ))
|
||||
if( type == ET_BEAM )
|
||||
{
|
||||
if( tr.draw_list->num_beam_entities >= MAX_VISIBLE_PACKET )
|
||||
{
|
||||
gEngfuncs.Con_Printf( S_ERROR "Too many beams %d!\n", tr.draw_list->num_beam_entities );
|
||||
return false;
|
||||
}
|
||||
|
||||
tr.draw_list->beam_entities[tr.draw_list->num_beam_entities] = clent;
|
||||
tr.draw_list->num_beam_entities++;
|
||||
|
||||
return true;
|
||||
}
|
||||
else if( R_OpaqueEntity( clent ))
|
||||
{
|
||||
// opaque
|
||||
if( tr.draw_list->num_solid_entities >= MAX_VISIBLE_PACKET )
|
||||
|
||||
@@ -75,11 +75,6 @@ static qboolean R_AddEntity( struct cl_entity_s *clent, int type )
|
||||
return true;
|
||||
}
|
||||
|
||||
static void CL_AddCustomBeam( cl_entity_t *pEnvBeam )
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
static void R_ProcessEntData( qboolean allocate, cl_entity_t *entities, unsigned int max_entities )
|
||||
{
|
||||
;
|
||||
@@ -460,7 +455,6 @@ static const ref_interface_t gReffuncs =
|
||||
.GL_SetRenderMode = R_SimpleStubInt,
|
||||
|
||||
.R_AddEntity = R_AddEntity,
|
||||
.CL_AddCustomBeam = CL_AddCustomBeam,
|
||||
.R_ProcessEntData = R_ProcessEntData,
|
||||
.R_Flush = R_SimpleStubUInt,
|
||||
|
||||
@@ -539,8 +533,6 @@ static const ref_interface_t gReffuncs =
|
||||
.GL_TextureTarget = R_SimpleStubUInt,
|
||||
.GL_TexCoordArrayMode = R_SimpleStubUInt,
|
||||
.GL_UpdateTexSize = GL_UpdateTexSize,
|
||||
.GL_Reserved0 = NULL,
|
||||
.GL_Reserved1 = NULL,
|
||||
|
||||
.GL_DrawParticles = GL_DrawParticles,
|
||||
.LightVec = LightVec,
|
||||
|
||||
@@ -122,29 +122,6 @@ qboolean GAME_EXPORT R_BeamCull( const vec3_t start, const vec3_t end, qboolean
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
CL_AddCustomBeam
|
||||
|
||||
Add the beam that encoded as custom entity
|
||||
================
|
||||
*/
|
||||
void GAME_EXPORT CL_AddCustomBeam( cl_entity_t *pEnvBeam )
|
||||
{
|
||||
if( tr.draw_list->num_beam_entities >= MAX_VISIBLE_PACKET )
|
||||
{
|
||||
gEngfuncs.Con_Printf( S_ERROR "Too many beams %d!\n", tr.draw_list->num_beam_entities );
|
||||
return;
|
||||
}
|
||||
|
||||
if( pEnvBeam )
|
||||
{
|
||||
tr.draw_list->beam_entities[tr.draw_list->num_beam_entities] = pEnvBeam;
|
||||
tr.draw_list->num_beam_entities++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
==============================================================
|
||||
|
||||
|
||||
@@ -438,7 +438,6 @@ static const ref_interface_t gReffuncs =
|
||||
GL_SetRenderMode,
|
||||
|
||||
R_AddEntity,
|
||||
CL_AddCustomBeam,
|
||||
R_ProcessEntData,
|
||||
R_Flush,
|
||||
|
||||
@@ -517,8 +516,6 @@ static const ref_interface_t gReffuncs =
|
||||
GL_TextureTarget,
|
||||
GL_SetTexCoordArrayMode,
|
||||
GL_UpdateTexSize,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
CL_DrawParticlesExternal,
|
||||
R_LightVec,
|
||||
|
||||
@@ -529,7 +529,6 @@ void R_ClearAllDecals( void );
|
||||
byte *Mod_GetCurrentVis( void );
|
||||
void Mod_SetOrthoBounds( const float *mins, const float *maxs );
|
||||
void R_NewMap( void );
|
||||
void CL_AddCustomBeam( cl_entity_t *pEnvBeam );
|
||||
|
||||
//
|
||||
// gl_triapi.c
|
||||
|
||||
@@ -319,9 +319,6 @@ qboolean GAME_EXPORT R_AddEntity( struct cl_entity_s *clent, int type )
|
||||
if( !r_drawentities->value )
|
||||
return false; // not allow to drawing
|
||||
|
||||
if( !clent || !clent->model )
|
||||
return false; // if set to invisible, skip
|
||||
|
||||
if( FBitSet( clent->curstate.effects, EF_NODRAW ))
|
||||
return false; // done
|
||||
|
||||
@@ -331,7 +328,20 @@ qboolean GAME_EXPORT R_AddEntity( struct cl_entity_s *clent, int type )
|
||||
if( type == ET_FRAGMENTED )
|
||||
r_stats.c_client_ents++;
|
||||
|
||||
if( R_OpaqueEntity( clent ))
|
||||
if( type == ET_BEAM )
|
||||
{
|
||||
if( tr.draw_list->num_beam_entities >= MAX_VISIBLE_PACKET )
|
||||
{
|
||||
gEngfuncs.Con_Printf( S_ERROR "Too many beams %d!\n", tr.draw_list->num_beam_entities );
|
||||
return false;
|
||||
}
|
||||
|
||||
tr.draw_list->beam_entities[tr.draw_list->num_beam_entities] = clent;
|
||||
tr.draw_list->num_beam_entities++;
|
||||
|
||||
return true;
|
||||
}
|
||||
else if( R_OpaqueEntity( clent ))
|
||||
{
|
||||
if( clent->model->type == mod_brush )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user