OpenGL: Implement debug callback

This commit is contained in:
Lynix
2020-04-19 15:19:16 +02:00
parent a842e89881
commit d62e99091f
4 changed files with 154 additions and 5 deletions

View File

@@ -59,10 +59,14 @@ namespace Nz::GL
protected:
virtual const Loader& GetLoader() = 0;
virtual bool ImplementFallback(const std::string_view& function) = 0;
virtual bool ImplementFallback(const std::string_view& function);
std::unordered_set<std::string> m_supportedExtensions;
ContextParams m_params;
private:
void GL_APIENTRY HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message) const;
};
}

View File

@@ -8,10 +8,12 @@
#define NAZARA_OPENGLRENDERER_COREFUNCTIONS_HPP
#define GL_GLES_PROTOTYPES 0
#include <GLES3/gl3.h>
#include <GLES3/gl32.h>
#include <GLES2/gl2ext.h>
// OpenGL core
#define NAZARA_OPENGLRENDERER_FOREACH_GLES_FUNC(cb) \
#define NAZARA_OPENGLRENDERER_FOREACH_GLES_FUNC(cb, extCb) \
cb(glActiveTexture, PFNGLACTIVETEXTUREPROC) \
cb(glAttachShader, PFNGLATTACHSHADERPROC) \
cb(glBeginQuery, PFNGLBEGINQUERYPROC) \
@@ -139,5 +141,7 @@
cb(glVertexAttribPointer, PFNGLVERTEXATTRIBPOINTERPROC) \
cb(glVertexAttribIPointer, PFNGLVERTEXATTRIBIPOINTERPROC) \
cb(glViewport, PFNGLVIEWPORTPROC) \
\
extCb(glDebugMessageCallback, PFNGLDEBUGMESSAGECALLBACKPROC) \
#endif