mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-09 17:51:36 +00:00
Remove GLU library loading code
hope i didnt forger smth X)
This commit is contained in:
parent
30e7bd90a4
commit
338088104e
5 changed files with 1 additions and 62 deletions
|
@ -117,7 +117,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, // handle to DLL module
|
|||
#define pwglDeleteContext wglDeleteContext;
|
||||
#define pwglMakeCurrent wglMakeCurrent;
|
||||
#else
|
||||
static HMODULE OGL32, GLU32;
|
||||
static HMODULE OGL32;
|
||||
typedef void *(WINAPI *PFNwglGetProcAddress) (const char *);
|
||||
static PFNwglGetProcAddress pwglGetProcAddress;
|
||||
typedef HGLRC (WINAPI *PFNwglCreateContext) (HDC hdc);
|
||||
|
@ -132,13 +132,6 @@ static PFNwglMakeCurrent pwglMakeCurrent;
|
|||
void *GetGLFunc(const char *proc)
|
||||
{
|
||||
void *func = NULL;
|
||||
if (strncmp(proc, "glu", 3) == 0)
|
||||
{
|
||||
if (GLU32)
|
||||
func = GetProcAddress(GLU32, proc);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
if (pwglGetProcAddress)
|
||||
func = pwglGetProcAddress(proc);
|
||||
if (!func)
|
||||
|
@ -155,8 +148,6 @@ boolean LoadGL(void)
|
|||
if (!OGL32)
|
||||
return 0;
|
||||
|
||||
GLU32 = LoadLibrary("GLU32.DLL");
|
||||
|
||||
pwglGetProcAddress = GetGLFunc("wglGetProcAddress");
|
||||
pwglCreateContext = GetGLFunc("wglCreateContext");
|
||||
pwglDeleteContext = GetGLFunc("wglDeleteContext");
|
||||
|
@ -528,7 +519,6 @@ EXPORT void HWRAPI(Shutdown) (void)
|
|||
ReleaseDC(hWnd, hDC);
|
||||
hDC = NULL;
|
||||
}
|
||||
FreeLibrary(GLU32);
|
||||
FreeLibrary(OGL32);
|
||||
GL_DBG_Printf ("HWRAPI Shutdown(DONE)\n");
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#ifdef STATIC_OPENGL // Because of the 1.3 functions, you'll need GLext to compile it if static
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
|
|
@ -2026,8 +2026,6 @@ void I_ShutdownGraphics(void)
|
|||
I_OutputMsg("shut down\n");
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (GLUhandle)
|
||||
hwClose(GLUhandle);
|
||||
if (sdlglcontext)
|
||||
{
|
||||
SDL_GL_DeleteContext(sdlglcontext);
|
||||
|
|
|
@ -70,18 +70,10 @@ PFNglGetString pglGetString;
|
|||
/** \brief SDL video display surface
|
||||
*/
|
||||
INT32 oglflags = 0;
|
||||
void *GLUhandle = NULL;
|
||||
SDL_GLContext sdlglcontext = 0;
|
||||
|
||||
void *GetGLFunc(const char *proc)
|
||||
{
|
||||
if (strncmp(proc, "glu", 3) == 0)
|
||||
{
|
||||
if (GLUhandle)
|
||||
return hwSym(proc, GLUhandle);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
return SDL_GL_GetProcAddress(proc);
|
||||
}
|
||||
|
||||
|
@ -89,7 +81,6 @@ boolean LoadGL(void)
|
|||
{
|
||||
#ifndef STATIC_OPENGL
|
||||
const char *OGLLibname = NULL;
|
||||
const char *GLULibname = NULL;
|
||||
|
||||
if (M_CheckParm("-OGLlib") && M_IsNextParm())
|
||||
OGLLibname = M_GetNextParm();
|
||||
|
@ -102,43 +93,6 @@ boolean LoadGL(void)
|
|||
CONS_Printf("If you know what is the OpenGL library's name, use -OGLlib\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
GLULibname = "/proc/self/exe";
|
||||
#elif defined (_WIN32)
|
||||
GLULibname = "GLU32.DLL";
|
||||
#elif defined (__MACH__)
|
||||
GLULibname = "/System/Library/Frameworks/OpenGL.framework/Libraries/libGLU.dylib";
|
||||
#elif defined (macintos)
|
||||
GLULibname = "OpenGLLibrary";
|
||||
#elif defined (__unix__)
|
||||
GLULibname = "libGLU.so.1";
|
||||
#elif defined (__HAIKU__)
|
||||
GLULibname = "libGLU.so";
|
||||
#else
|
||||
GLULibname = NULL;
|
||||
#endif
|
||||
|
||||
if (M_CheckParm("-GLUlib") && M_IsNextParm())
|
||||
GLULibname = M_GetNextParm();
|
||||
|
||||
if (GLULibname)
|
||||
{
|
||||
GLUhandle = hwOpen(GLULibname);
|
||||
if (GLUhandle)
|
||||
return SetupGLfunc();
|
||||
else
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "Could not load GLU Library: %s\n", GLULibname);
|
||||
if (!M_CheckParm ("-GLUlib"))
|
||||
CONS_Alert(CONS_ERROR, "If you know what is the GLU library's name, use -GLUlib\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "Could not load GLU Library\n");
|
||||
CONS_Alert(CONS_ERROR, "If you know what is the GLU library's name, use -GLUlib\n");
|
||||
}
|
||||
#endif
|
||||
return SetupGLfunc();
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
#include "../v_video.h"
|
||||
|
||||
extern void *GLUhandle;
|
||||
|
||||
boolean OglSdlSurface(INT32 w, INT32 h);
|
||||
|
||||
void OglSdlFinishUpdate(boolean vidwait);
|
||||
|
|
Loading…
Reference in a new issue