From 4b163e6d3011cd1b1fea26094d8a0a2b5c8c0be9 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 28 Jul 2019 00:13:40 +0300 Subject: [PATCH] engine: hide FCVAR_RENDERINFO from renderdll, remove OpenGLConfigHack from engine functions, add GetConfigName to renderdll functions --- common/cvardef.h | 4 ++-- engine/ref_api.h | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/common/cvardef.h b/common/cvardef.h index d963619e..732bf735 100644 --- a/common/cvardef.h +++ b/common/cvardef.h @@ -28,7 +28,7 @@ #define FCVAR_MOVEVARS (1<<10) // this cvar is a part of movevars_t struct that shared between client and server #define FCVAR_LATCH (1<<11) // notify client what this cvar will be applied only after server restart (but don't does more nothing) -#define FCVAR_GLCONFIG (1<<12) // write it into opengl.cfg +#define FCVAR_GLCONFIG (1<<12) // write it into .cfg(see RefAPI) #define FCVAR_CHANGED (1<<13) // set each time the cvar is changed #define FCVAR_GAMEUIDLL (1<<14) // defined by the menu DLL #define FCVAR_CHEAT (1<<15) // can not be changed if cheats are disabled @@ -42,4 +42,4 @@ typedef struct cvar_s struct cvar_s *next; } cvar_t; -#endif//CVARDEF_H \ No newline at end of file +#endif//CVARDEF_H diff --git a/engine/ref_api.h b/engine/ref_api.h index 5f0d33b0..fbe31b9d 100644 --- a/engine/ref_api.h +++ b/engine/ref_api.h @@ -39,7 +39,6 @@ GNU General Public License for more details. #define FCONTEXT_CORE_PROFILE BIT( 0 ) #define FCONTEXT_DEBUG_ARB BIT( 1 ) -#define FCVAR_RENDERINFO (1<<16) // save to a seperate config called video.cfg #define FCVAR_READ_ONLY (1<<17) // cannot be set by user at all, and can't be requested by CvarGetPointer from game dlls // screenshot types @@ -267,7 +266,6 @@ typedef struct ref_api_s void (*Cbuf_AddText)( const char *commands ); void (*Cbuf_InsertText)( const char *commands ); void (*Cbuf_Execute)( void ); - void (*Cbuf_SetOpenGLConfigHack)( qboolean set ); // host.apply_opengl_config // logging void (*Con_Printf)( const char *fmt, ... ); // typical console allowed messages @@ -371,7 +369,7 @@ typedef struct ref_api_s // video init // try to create window // will call GL_SetupAttributes in case of REF_GL - qboolean (*R_Init_Video)( int type ); + qboolean (*R_Init_Video)( int type ); // will also load and execute renderer config(see R_GetConfigName) void (*R_Free_Video)( void ); // GL @@ -435,6 +433,7 @@ typedef struct ref_interface_s qboolean (*R_Init)( void ); // context is true if you need context management // const char *(*R_GetInitError)( void ); void (*R_Shutdown)( void ); + const char *(*R_GetConfigName)( void ); // returns config name without extension // only called for GL contexts void (*GL_SetupAttributes)( int safegl ); @@ -606,7 +605,6 @@ typedef struct ref_interface_s void (*VGUI_DrawQuad)( const vpoint_t *ul, const vpoint_t *lr ); void (*VGUI_GetTextureSizes)( int *width, int *height ); int (*VGUI_GenerateTexture)( void ); - } ref_interface_t; typedef int (*REFAPI)( int version, ref_interface_t *pFunctionTable, ref_api_t* engfuncs, ref_globals_t *pGlobals );