mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-04 02:24:00 +00:00
Load GL symbols *after* creating the window, else we only get a basic GL 1.1 context
This commit is contained in:
parent
90d70c117b
commit
ce869ba55a
1 changed files with 17 additions and 17 deletions
|
@ -606,23 +606,6 @@ void Core::init()
|
|||
exit_error("Failed to init SDL");
|
||||
}
|
||||
|
||||
#if BBGE_BUILD_OPENGL_DYNAMIC
|
||||
if (SDL_GL_LoadLibrary(NULL) == -1)
|
||||
{
|
||||
std::string err = std::string("SDL_GL_LoadLibrary Error: ") + std::string(SDL_GetError());
|
||||
SDL_Quit();
|
||||
exit_error(err);
|
||||
}
|
||||
|
||||
if (!lookup_all_glsyms())
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << "Couldn't load OpenGL symbols we need\n";
|
||||
SDL_Quit();
|
||||
exit_error(os.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
loopDone = false;
|
||||
|
||||
initLocalization();
|
||||
|
@ -857,6 +840,23 @@ bool Core::initGraphicsLibrary(int width, int height, bool fullscreen, bool vsyn
|
|||
#endif
|
||||
}
|
||||
|
||||
#if BBGE_BUILD_OPENGL_DYNAMIC
|
||||
if (SDL_GL_LoadLibrary(NULL) == -1)
|
||||
{
|
||||
std::string err = std::string("SDL_GL_LoadLibrary Error: ") + std::string(SDL_GetError());
|
||||
SDL_Quit();
|
||||
exit_error(err);
|
||||
}
|
||||
|
||||
if (!lookup_all_glsyms())
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << "Couldn't load OpenGL symbols we need\n";
|
||||
SDL_Quit();
|
||||
exit_error(os.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
debugLog("GL vendor, renderer & version:");
|
||||
debugLog((const char*)glGetString(GL_VENDOR));
|
||||
debugLog((const char*)glGetString(GL_RENDERER));
|
||||
|
|
Loading…
Add table
Reference in a new issue