Skip to content

Commit

Permalink
ref_api: add R_Flush method
Browse files Browse the repository at this point in the history
  • Loading branch information
mittorn authored and a1batross committed Dec 6, 2023
1 parent 1612e2d commit c800b34
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engine/ref_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ typedef struct ref_interface_s
void (*GL_InitExtensions)( void );
void (*GL_ClearExtensions)( void );

// scene rendering
void (*R_BeginFrame)( qboolean clearScene );
void (*R_RenderScene)( void );
void (*R_EndFrame)( void );
Expand All @@ -461,7 +462,8 @@ typedef struct ref_interface_s

qboolean (*R_AddEntity)( struct cl_entity_s *clent, int type );
void (*CL_AddCustomBeam)( cl_entity_t *pEnvBeam );
void (*R_ProcessEntData)( qboolean allocate, cl_entity_t *entities, unsigned int max_entities );
void (*R_ProcessEntData)( qboolean allocate, cl_entity_t *entities, unsigned int max_entities );
void (*R_Flush)( unsigned int flush_flags );

// debug
void (*R_ShowTextures)( void );
Expand Down
6 changes: 6 additions & 0 deletions ref/gl/gl_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,11 @@ void R_ProcessEntData( qboolean allocate, cl_entity_t *entities, unsigned int ma
gEngfuncs.drawFuncs->R_ProcessEntData( allocate );
}

static void GAME_EXPORT R_Flush( unsigned int flags )
{
// stub
}

qboolean R_SetDisplayTransform( ref_screen_rotation_t rotate, int offset_x, int offset_y, float scale_x, float scale_y )
{
qboolean ret = true;
Expand Down Expand Up @@ -380,6 +385,7 @@ ref_interface_t gReffuncs =
R_AddEntity,
CL_AddCustomBeam,
R_ProcessEntData,
R_Flush,

R_ShowTextures,

Expand Down
6 changes: 6 additions & 0 deletions ref/soft/r_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,11 @@ void GAME_EXPORT R_ProcessEntData( qboolean allocate, cl_entity_t *entities, uns
tr.max_entities = max_entities;
}

static void GAME_EXPORT R_Flush( unsigned int flags )
{
// stub
}

// stubs

void GAME_EXPORT GL_SetTexCoordArrayMode( uint mode )
Expand Down Expand Up @@ -426,6 +431,7 @@ ref_interface_t gReffuncs =
R_AddEntity,
CL_AddCustomBeam,
R_ProcessEntData,
R_Flush,

R_ShowTextures,

Expand Down

0 comments on commit c800b34

Please sign in to comment.