engine: hide FCVAR_RENDERINFO from renderdll, remove OpenGLConfigHack from engine functions, add GetConfigName to renderdll functions

This commit is contained in:
Alibek Omarov 2019-07-28 00:13:40 +03:00
parent 147c702f2f
commit 4b163e6d30
2 changed files with 4 additions and 6 deletions

View File

@ -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_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_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 <renderer>.cfg(see RefAPI)
#define FCVAR_CHANGED (1<<13) // set each time the cvar is changed #define FCVAR_CHANGED (1<<13) // set each time the cvar is changed
#define FCVAR_GAMEUIDLL (1<<14) // defined by the menu DLL #define FCVAR_GAMEUIDLL (1<<14) // defined by the menu DLL
#define FCVAR_CHEAT (1<<15) // can not be changed if cheats are disabled #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; struct cvar_s *next;
} cvar_t; } cvar_t;
#endif//CVARDEF_H #endif//CVARDEF_H

View File

@ -39,7 +39,6 @@ GNU General Public License for more details.
#define FCONTEXT_CORE_PROFILE BIT( 0 ) #define FCONTEXT_CORE_PROFILE BIT( 0 )
#define FCONTEXT_DEBUG_ARB BIT( 1 ) #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 #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 // screenshot types
@ -267,7 +266,6 @@ typedef struct ref_api_s
void (*Cbuf_AddText)( const char *commands ); void (*Cbuf_AddText)( const char *commands );
void (*Cbuf_InsertText)( const char *commands ); void (*Cbuf_InsertText)( const char *commands );
void (*Cbuf_Execute)( void ); void (*Cbuf_Execute)( void );
void (*Cbuf_SetOpenGLConfigHack)( qboolean set ); // host.apply_opengl_config
// logging // logging
void (*Con_Printf)( const char *fmt, ... ); // typical console allowed messages void (*Con_Printf)( const char *fmt, ... ); // typical console allowed messages
@ -371,7 +369,7 @@ typedef struct ref_api_s
// video init // video init
// try to create window // try to create window
// will call GL_SetupAttributes in case of REF_GL // 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 ); void (*R_Free_Video)( void );
// GL // GL
@ -435,6 +433,7 @@ typedef struct ref_interface_s
qboolean (*R_Init)( void ); // context is true if you need context management qboolean (*R_Init)( void ); // context is true if you need context management
// const char *(*R_GetInitError)( void ); // const char *(*R_GetInitError)( void );
void (*R_Shutdown)( void ); void (*R_Shutdown)( void );
const char *(*R_GetConfigName)( void ); // returns config name without extension
// only called for GL contexts // only called for GL contexts
void (*GL_SetupAttributes)( int safegl ); 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_DrawQuad)( const vpoint_t *ul, const vpoint_t *lr );
void (*VGUI_GetTextureSizes)( int *width, int *height ); void (*VGUI_GetTextureSizes)( int *width, int *height );
int (*VGUI_GenerateTexture)( void ); int (*VGUI_GenerateTexture)( void );
} ref_interface_t; } ref_interface_t;
typedef int (*REFAPI)( int version, ref_interface_t *pFunctionTable, ref_api_t* engfuncs, ref_globals_t *pGlobals ); typedef int (*REFAPI)( int version, ref_interface_t *pFunctionTable, ref_api_t* engfuncs, ref_globals_t *pGlobals );