From 9a9afb57177e713a19a2593bb1223d6f58b699dc Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Sun, 3 May 2015 03:59:00 -0700 Subject: [PATCH] always use gl runtime loading for windows (and only for windows) --- arch/carbon/conf.h | 2 -- arch/ogl/vid.c | 16 ++-------------- arch/ogl/wgl.c | 2 -- include/ogl_init.h | 7 +------ main/inferno.c | 3 --- 5 files changed, 3 insertions(+), 27 deletions(-) diff --git a/arch/carbon/conf.h b/arch/carbon/conf.h index 09a9feb6..d3a6d236 100755 --- a/arch/carbon/conf.h +++ b/arch/carbon/conf.h @@ -139,8 +139,6 @@ # define inline # endif -#define OGL_RUNTIME_LOAD // avoids corruption of OpenGL - //#define TARGET_API_MAC_CARBON 1 /* Define to 1 if the system has the type `struct timespec'. */ #define HAVE_STRUCT_TIMESPEC 0 diff --git a/arch/ogl/vid.c b/arch/ogl/vid.c index f5d1bcda..5489d940 100644 --- a/arch/ogl/vid.c +++ b/arch/ogl/vid.c @@ -412,26 +412,14 @@ void ogl_cmd_texturemode(int argc, char **argv) } -#ifdef OGL_RUNTIME_LOAD #ifdef _WIN32 char *OglLibPath="opengl32.dll"; -#endif -#ifdef __unix__ -char *OglLibPath="libGL.so"; -#endif -#ifdef macintosh -char *OglLibPath = NULL; -#endif int ogl_rt_loaded=0; int ogl_init_load_library(void) { int retcode=0; if (!ogl_rt_loaded){ - int t; - if ((t=FindArg("-gl_library"))) - OglLibPath=Args[t+1]; - retcode = OpenGL_LoadLibrary(true); if(retcode) { @@ -459,7 +447,7 @@ int vid_init(void) if (vid_installed == 1) return -1; -#ifdef OGL_RUNTIME_LOAD +#ifdef _WIN32 ogl_init_load_library(); #endif @@ -553,7 +541,7 @@ void vid_close(void) ogl_close();//platform specific code -#ifdef OGL_RUNTIME_LOAD +#ifdef _WIN32 if (ogl_rt_loaded) OpenGL_LoadLibrary(false); #endif diff --git a/arch/ogl/wgl.c b/arch/ogl/wgl.c index 0fa9c872..032e2710 100644 --- a/arch/ogl/wgl.c +++ b/arch/ogl/wgl.c @@ -429,9 +429,7 @@ bool OpenGL_Initialize(void) // loaded) // remove the following error when you figure out what you want to do // it's put here to make sure you notice this -#ifdef OGL_RUNTIME_LOAD ogl_init_load_library(); -#endif // Setup our pixel format diff --git a/include/ogl_init.h b/include/ogl_init.h index 6ee28d99..5550a640 100644 --- a/include/ogl_init.h +++ b/include/ogl_init.h @@ -13,16 +13,11 @@ # define MAC(x) #endif -#ifdef _MSC_VER //_WIN32 -#define OGL_RUNTIME_LOAD -#endif - -#ifdef OGL_RUNTIME_LOAD +#ifdef _WIN32 #include "loadgl.h" int ogl_init_load_library(void); #else #define GL_GLEXT_LEGACY -#undef GL_ARB_multitexture #if defined(__APPLE__) && defined(__MACH__) #include #include diff --git a/main/inferno.c b/main/inferno.c index 2a2056ef..019aaf35 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -288,9 +288,6 @@ void print_commandline_help() // printf( " -gl_test1 %s\n","FIXME: Undocumented"); printf( " -gl_test2 %s\n","FIXME: Undocumented"); printf( " -gl_vidmem %s\n","FIXME: Undocumented"); -#ifdef OGL_RUNTIME_LOAD - printf( " -gl_library %s\n","use alternate opengl library"); -#endif #ifdef WGL_VIDEO printf(" -gl_refresh %s\n", "set refresh rate (in fullscreen mode)"); #endif -- 2.39.2