misc: Switch from gl3w to glad

Also add more checks on window and context creation.
This commit is contained in:
Mary 2023-06-17 11:26:18 +02:00
parent 6c29e3e0be
commit f3010f0909
12 changed files with 22075 additions and 10164 deletions

View file

@ -28,7 +28,7 @@
#include <type_traits>
#include <utility>
#include "gl3w.h"
#include <glad/gl.h>
// Check if we have C++20. If yes, we can add C++20 std::span support
#ifdef _MSVC_LANG // MSVC does not properly define __cplusplus without a compiler flag...
@ -523,8 +523,6 @@ namespace OpenGL {
static GLint getProgram() { return get<GLint>(GL_CURRENT_PROGRAM); }
static bool scissorEnabled() { return isEnabled(GL_SCISSOR_TEST); }
static bool versionSupported(int major, int minor) { return gl3wIsSupported(major, minor); }
[[nodiscard]] static GLint uniformLocation(GLuint program, const char* name) {
return glGetUniformLocation(program, name);
}