mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- check the return value of ogl_LoadFunctions and abort if it indicates failure.
If this happens there is normally something very wrong on the system side so continuing is not advised.
This commit is contained in:
parent
7983f6ea4f
commit
47bb29bac6
2 changed files with 8 additions and 2 deletions
|
@ -120,7 +120,10 @@ void OpenGLFrameBuffer::InitializeState()
|
|||
|
||||
if (first)
|
||||
{
|
||||
ogl_LoadFunctions();
|
||||
if (ogl_LoadFunctions() == ogl_LOAD_FAILED)
|
||||
{
|
||||
I_FatalError("Failed to load OpenGL functions.");
|
||||
}
|
||||
}
|
||||
|
||||
gl_LoadExtensions();
|
||||
|
|
|
@ -888,7 +888,10 @@ CocoaFrameBuffer::CocoaFrameBuffer(int width, int height, bool bgra, bool fullsc
|
|||
|
||||
if (!isOpenGLInitialized)
|
||||
{
|
||||
ogl_LoadFunctions();
|
||||
if (ogl_LoadFunctions() == ogl_LOAD_FAILED)
|
||||
{
|
||||
I_FatalError("Failed to load OpenGL functions.");
|
||||
}
|
||||
isOpenGLInitialized = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue