Browse Source

ref_api: remove GL_OnContextCreated, remove return value of GL_RenderFrame

pull/2/head
Alibek Omarov 6 years ago
parent
commit
2e953bd1a9
  1. 2
      engine/platform/android/vid_android.c
  2. 2
      engine/platform/sdl/vid_sdl.c
  3. 3
      engine/ref_api.h
  4. 1
      ref_gl/gl_context.c
  5. 2
      ref_gl/gl_local.h
  6. 2
      ref_gl/gl_opengl.c
  7. 8
      ref_gl/gl_rmain.c

2
engine/platform/android/vid_android.c

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

2
engine/platform/sdl/vid_sdl.c

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

3
engine/ref_api.h

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

1
ref_gl/gl_context.c

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

2
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_ScreenShot( const char *filename, int shot_type );
qboolean VID_CubemapShot( const char *base, uint size, const float *vieworg, qboolean skyshot ); qboolean VID_CubemapShot( const char *base, uint size, const float *vieworg, qboolean skyshot );
void R_BeginFrame( qboolean clearScene ); 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_EndFrame( void );
void R_ClearScene( void ); void R_ClearScene( void );
void R_GetTextureParms( int *w, int *h, int texnum ); void R_GetTextureParms( int *w, int *h, int texnum );

2
ref_gl/gl_opengl.c

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

8
ref_gl/gl_rmain.c

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

Loading…
Cancel
Save