Make ogl_init_load_library static
This commit is contained in:
parent
ee2273a77b
commit
853713190d
|
@ -1306,16 +1306,13 @@ void *dll_GetSymbol(void *dllhandle,const char *symname)
|
||||||
|
|
||||||
void OpenGL_SetFuncsToNull(void);
|
void OpenGL_SetFuncsToNull(void);
|
||||||
|
|
||||||
extern char *OglLibPath;
|
|
||||||
|
|
||||||
#ifndef DECLARE_VARS
|
#ifndef DECLARE_VARS
|
||||||
// pass true to load the library
|
// pass true to load the library
|
||||||
// pass false to unload it
|
// pass false to unload it
|
||||||
bool OpenGL_LoadLibrary(bool load);//load=true removed because not c++
|
bool OpenGL_LoadLibrary(bool load, const char *OglLibPath);//load=true removed because not c++
|
||||||
#else
|
#else
|
||||||
void *OpenGLModuleHandle=NULL;
|
void *OpenGLModuleHandle=NULL;
|
||||||
//char *OglLibPath="opengl32.dll";
|
bool OpenGL_LoadLibrary(bool load, const char *OglLibPath)
|
||||||
bool OpenGL_LoadLibrary(bool load)
|
|
||||||
{
|
{
|
||||||
if(load && OpenGLModuleHandle)
|
if(load && OpenGLModuleHandle)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "loadgl.h"
|
#include "loadgl.h"
|
||||||
int ogl_init_load_library(void);
|
|
||||||
#else
|
#else
|
||||||
# define GL_GLEXT_LEGACY
|
# define GL_GLEXT_LEGACY
|
||||||
# if defined(__APPLE__) && defined(__MACH__)
|
# if defined(__APPLE__) && defined(__MACH__)
|
||||||
|
|
|
@ -675,15 +675,15 @@ int ogl_atotexfilti(char *a,int min)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
char *OglLibPath="opengl32.dll";
|
static const char OglLibPath[]="opengl32.dll";
|
||||||
|
|
||||||
int ogl_rt_loaded=0;
|
static int ogl_rt_loaded=0;
|
||||||
int ogl_init_load_library(void)
|
static int ogl_init_load_library(void)
|
||||||
{
|
{
|
||||||
int retcode=0;
|
int retcode=0;
|
||||||
if (!ogl_rt_loaded)
|
if (!ogl_rt_loaded)
|
||||||
{
|
{
|
||||||
retcode = OpenGL_LoadLibrary(true);
|
retcode = OpenGL_LoadLibrary(true, OglLibPath);
|
||||||
if(retcode)
|
if(retcode)
|
||||||
{
|
{
|
||||||
if(!glEnd)
|
if(!glEnd)
|
||||||
|
|
Loading…
Reference in a new issue