ref_api: remove GL_OnContextCreated, remove return value of GL_RenderFrame

This commit is contained in:
Alibek Omarov 2019-05-12 18:02:59 +03:00
parent 57f9e7dda6
commit 2e953bd1a9
7 changed files with 8 additions and 12 deletions

View File

@ -315,8 +315,6 @@ qboolean VID_SetMode( void )
negl.valid = true;
ref.dllFuncs.GL_OnContextCreated();
return true;
}

View File

@ -429,8 +429,6 @@ qboolean GL_CreateContext( void )
return GL_DeleteContext();
}
ref.dllFuncs.GL_OnContextCreated();
return true;
}

View File

@ -445,7 +445,6 @@ typedef struct ref_interface_s
// only called for GL contexts
void (*GL_SetupAttributes)( int safegl );
void (*GL_OnContextCreated)( void );
void (*GL_InitExtensions)( void );
void (*GL_ClearExtensions)( void );
@ -572,7 +571,7 @@ typedef struct ref_interface_s
struct mstudiotex_s *( *StudioGetTexture )( struct cl_entity_s *e );
// passed through R_RenderFrame (0 - use engine renderer, 1 - use custom client renderer)
int (*GL_RenderFrame)( const struct ref_viewpass_s *rvp );
void (*GL_RenderFrame)( const struct ref_viewpass_s *rvp );
// setup map bounds for ortho-projection when we in dev_overview mode
void (*GL_OrthoBounds)( const float *mins, const float *maxs );
// grab r_speeds message

View File

@ -336,7 +336,6 @@ ref_interface_t gReffuncs =
R_Shutdown,
GL_SetupAttributes,
GL_OnContextCreated,
GL_InitExtensions,
GL_ClearExtensions,

View File

@ -525,7 +525,7 @@ void GL_FreeImage( const char *name );
qboolean VID_ScreenShot( const char *filename, int shot_type );
qboolean VID_CubemapShot( const char *base, uint size, const float *vieworg, qboolean skyshot );
void R_BeginFrame( qboolean clearScene );
int R_RenderFrame( const struct ref_viewpass_s *vp );
void R_RenderFrame( const struct ref_viewpass_s *vp );
void R_EndFrame( void );
void R_ClearScene( void );
void R_GetTextureParms( int *w, int *h, int texnum );

View File

@ -705,6 +705,8 @@ void GL_InitExtensionsBigGL()
void GL_InitExtensions( void )
{
GL_OnContextCreated();
// initialize gl extensions
GL_CheckExtension( "OpenGL 1.1.0", opengl_110funcs, NULL, GL_OPENGL_110 );

View File

@ -1100,10 +1100,10 @@ void R_SetupRefParams( const ref_viewpass_t *rvp )
R_RenderFrame
===============
*/
int R_RenderFrame( const ref_viewpass_t *rvp )
void R_RenderFrame( const ref_viewpass_t *rvp )
{
if( r_norefresh->value )
return 1;
return;
// setup the initial render params
R_SetupRefParams( rvp );
@ -1129,7 +1129,7 @@ int R_RenderFrame( const ref_viewpass_t *rvp )
R_GatherPlayerLight();
tr.realframecount++;
tr.fResetVis = true;
return 1;
return;
}
}
@ -1140,7 +1140,7 @@ int R_RenderFrame( const ref_viewpass_t *rvp )
tr.realframecount++; // right called after viewmodel events
R_RenderScene();
return 1;
return;
}
/*