mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 07:57:58 +00:00
- Use SDL_GL_GetProcAddress on platforms where the SDL is being used. Since SDL initialized OpenGL for us, it is the only reliable way of retrieving proc addresses.
- Check if ogl_LoadFunctions failed and make OpenGLSWFrameBuffer gracefully recover from that
This commit is contained in:
parent
74faacd218
commit
e690de25a8
2 changed files with 8 additions and 2 deletions
|
@ -85,7 +85,9 @@ static PROC WinGetProcAddress(const char *name)
|
||||||
#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
|
#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
|
||||||
#else
|
#else
|
||||||
#if defined(__sgi) || defined(__sun) || defined(__unix__)
|
#if defined(__sgi) || defined(__sun) || defined(__unix__)
|
||||||
#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
|
void* SDL_GL_GetProcAddress(const char* proc);
|
||||||
|
#define IntGetProcAddress(name) SDL_GL_GetProcAddress((const char*)name)
|
||||||
|
//#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
|
||||||
/* END OF MANUAL CHANGES, DO NOT REMOVE! */
|
/* END OF MANUAL CHANGES, DO NOT REMOVE! */
|
||||||
#else /* GLX */
|
#else /* GLX */
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
|
|
|
@ -194,7 +194,11 @@ OpenGLSWFrameBuffer::OpenGLSWFrameBuffer(void *hMonitor, int width, int height,
|
||||||
static bool first = true;
|
static bool first = true;
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
ogl_LoadFunctions();
|
if (ogl_LoadFunctions() == ogl_LOAD_FAILED)
|
||||||
|
{
|
||||||
|
Printf("OpenGL load failed. No OpenGL acceleration will be used.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
gl_LoadExtensions();
|
gl_LoadExtensions();
|
||||||
InitializeState();
|
InitializeState();
|
||||||
|
|
Loading…
Reference in a new issue