From c800b34cd4bd39bc378a7fb0e205610e96330bc2 Mon Sep 17 00:00:00 2001 From: mittorn Date: Tue, 5 Dec 2023 13:36:06 +0300 Subject: [PATCH] ref_api: add R_Flush method --- engine/ref_api.h | 4 +++- ref/gl/gl_context.c | 6 ++++++ ref/soft/r_context.c | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/engine/ref_api.h b/engine/ref_api.h index 2a460582..15d6c477 100644 --- a/engine/ref_api.h +++ b/engine/ref_api.h @@ -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 ); @@ -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 ); diff --git a/ref/gl/gl_context.c b/ref/gl/gl_context.c index b9f468aa..5b388511 100644 --- a/ref/gl/gl_context.c +++ b/ref/gl/gl_context.c @@ -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; @@ -380,6 +385,7 @@ ref_interface_t gReffuncs = R_AddEntity, CL_AddCustomBeam, R_ProcessEntData, + R_Flush, R_ShowTextures, diff --git a/ref/soft/r_context.c b/ref/soft/r_context.c index 016b5285..69fcdace 100644 --- a/ref/soft/r_context.c +++ b/ref/soft/r_context.c @@ -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 ) @@ -426,6 +431,7 @@ ref_interface_t gReffuncs = R_AddEntity, CL_AddCustomBeam, R_ProcessEntData, + R_Flush, R_ShowTextures,