mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-16 17:11:03 +00:00
Mobe LIBGL makro to common.h and replace all hardcoded libGL calls with it
This commit is contained in:
parent
751d39fb50
commit
c6eaf5c876
4 changed files with 9 additions and 13 deletions
|
@ -29,12 +29,6 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define LIBGL "opengl32.dll"
|
||||
#else
|
||||
#define LIBGL "libGL.so.1"
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *OpenGLLib; /* instance of OpenGL library */
|
||||
|
|
|
@ -163,7 +163,7 @@ ApplyChanges(void *unused)
|
|||
Cvar_Set("vid_ref", "gl");
|
||||
|
||||
/* below is wrong if we use different libs for different GL reflibs */
|
||||
Cvar_Get("gl_driver", "libGL.so.1", CVAR_ARCHIVE);
|
||||
Cvar_Get("gl_driver", LIBGL, CVAR_ARCHIVE);
|
||||
|
||||
if (gl_driver->modified)
|
||||
{
|
||||
|
|
|
@ -63,6 +63,13 @@
|
|||
#define CFGDIR ".yq2"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define LIBGL "opengl32.dll"
|
||||
#else
|
||||
#define LIBGL "libGL.so.1"
|
||||
#endif
|
||||
|
||||
|
||||
/* ================================================================== */
|
||||
|
||||
typedef struct sizebuf_s
|
||||
|
|
|
@ -998,12 +998,7 @@ R_Register(void)
|
|||
gl_polyblend = ri.Cvar_Get("gl_polyblend", "1", 0);
|
||||
gl_flashblend = ri.Cvar_Get("gl_flashblend", "0", 0);
|
||||
gl_playermip = ri.Cvar_Get("gl_playermip", "0", 0);
|
||||
|
||||
#ifdef _WIN32
|
||||
gl_driver = ri.Cvar_Get("gl_driver", "opengl32.dll", CVAR_ARCHIVE);
|
||||
#else
|
||||
gl_driver = ri.Cvar_Get("gl_driver", "libGL.so.1", CVAR_ARCHIVE);
|
||||
#endif
|
||||
gl_driver = ri.Cvar_Get("gl_driver", LIBGL, CVAR_ARCHIVE);
|
||||
|
||||
gl_texturemode = ri.Cvar_Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", CVAR_ARCHIVE);
|
||||
gl_texturealphamode = ri.Cvar_Get("gl_texturealphamode", "default", CVAR_ARCHIVE);
|
||||
|
|
Loading…
Reference in a new issue