2 #ifndef ENIGMA_OPENGL_UTILS_H
3 #define ENIGMA_OPENGL_UTILS_H
9 #define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
10 #define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
11 #define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
12 #define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
13 #define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
28 glGetIntegerv(GL_NUM_EXTENSIONS, &ext_count);
32 for (GLint i = 0; i < ext_count; ++i) {
33 const char *extension =
reinterpret_cast<const char *
>(glGetStringi(GL_EXTENSIONS, i));
34 if (std::strcmp(extension, extension_name) == 0) {
47 #define CASE_ENUM(e) \
56 CASE_ENUM(GL_INVALID_FRAMEBUFFER_OPERATION);
59 return "Unknown GLenum";
67 #define glAssert(call) \
70 const GLenum err = glGetError(); \
71 if (err != GL_NO_ERROR) { \
72 ENIGMA_ASSERT(false, OpenGLUtils::GetGLErrorEnumString(err)); \
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
static constexpr const char * GetGLErrorEnumString(const GLenum &_enum) noexcept
static const GLint IsExtensionSupported(const char *extension_name) noexcept