diff --git a/engine/platform/android/vid_android.c b/engine/platform/android/vid_android.c index 764f342b..ea029460 100644 --- a/engine/platform/android/vid_android.c +++ b/engine/platform/android/vid_android.c @@ -315,8 +315,6 @@ qboolean VID_SetMode( void ) negl.valid = true; - ref.dllFuncs.GL_OnContextCreated(); - return true; } diff --git a/engine/platform/sdl/vid_sdl.c b/engine/platform/sdl/vid_sdl.c index b2575c33..3dcf393f 100644 --- a/engine/platform/sdl/vid_sdl.c +++ b/engine/platform/sdl/vid_sdl.c @@ -429,8 +429,6 @@ qboolean GL_CreateContext( void ) return GL_DeleteContext(); } - ref.dllFuncs.GL_OnContextCreated(); - return true; } diff --git a/engine/ref_api.h b/engine/ref_api.h index 06a4acc9..21ea8c1a 100644 --- a/engine/ref_api.h +++ b/engine/ref_api.h @@ -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 diff --git a/ref_gl/gl_context.c b/ref_gl/gl_context.c index bf4d89ae..218f6b43 100644 --- a/ref_gl/gl_context.c +++ b/ref_gl/gl_context.c @@ -336,7 +336,6 @@ ref_interface_t gReffuncs = R_Shutdown, GL_SetupAttributes, - GL_OnContextCreated, GL_InitExtensions, GL_ClearExtensions, diff --git a/ref_gl/gl_local.h b/ref_gl/gl_local.h index 03c2bfb6..d9b48916 100644 --- a/ref_gl/gl_local.h +++ b/ref_gl/gl_local.h @@ -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 ); diff --git a/ref_gl/gl_opengl.c b/ref_gl/gl_opengl.c index b3d04057..c53bf53a 100644 --- a/ref_gl/gl_opengl.c +++ b/ref_gl/gl_opengl.c @@ -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 ); diff --git a/ref_gl/gl_rmain.c b/ref_gl/gl_rmain.c index 23341582..db237dc9 100644 --- a/ref_gl/gl_rmain.c +++ b/ref_gl/gl_rmain.c @@ -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; } /*