Implement more extensions to get graphics card memory for OpenGL on windows and Linux.

(cherry picked from commit da942cdb79a87b76e629b36415c83067e3620a70)
This commit is contained in:
Jeff Hutchinson 2021-10-10 20:08:03 -04:00
parent 794707edbe
commit a458c97217
2 changed files with 49 additions and 5 deletions

View file

@ -25,8 +25,10 @@
#include "core/strings/stringFunctions.h"
#include "console/console.h"
#ifdef TORQUE_OS_WIN
#include "tWGL.h"
#if defined(TORQUE_OS_WIN)
#include "tWGL.h"
#elif defined(TORQUE_OS_LINUX)
#include "tXGL.h"
#endif
namespace GL
@ -41,7 +43,17 @@ namespace GL
void gglPerformExtensionBinds(void *context)
{
#if defined(TORQUE_OS_WIN)
if (!gladLoadWGL((HDC)context))
{
AssertFatal(false, "Unable to load WGL in GLAD. Make sure your OpenGL drivers are up to date!");
}
#elif defined(TORQUE_OS_LINUX)
if (!gladLoadGLX())
{
AssertFatal(false, "Unable to load GLX in GLAD. Make sure your OpenGL drivers are up to date!");
}
#endif
}
}