mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Hook a couple more GL debug message functions
This commit is contained in:
@@ -800,6 +800,17 @@ void WrappedOpenGL::glDebugMessageCallback(GLDEBUGPROC callback, const void *use
|
||||
m_Real.glDebugMessageCallback(&DebugSnoopStatic, this);
|
||||
}
|
||||
|
||||
void WrappedOpenGL::glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
|
||||
{
|
||||
// we could exert control over debug messages here
|
||||
m_Real.glDebugMessageControl(source, type, severity, count, ids, enabled);
|
||||
}
|
||||
|
||||
void WrappedOpenGL::glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)
|
||||
{
|
||||
m_Real.glDebugMessageInsert(source, type, id, severity, length, buf);
|
||||
}
|
||||
|
||||
void WrappedOpenGL::ReadLogInitialisation()
|
||||
{
|
||||
uint64_t lastFrame = 0;
|
||||
|
||||
@@ -343,6 +343,8 @@ class WrappedOpenGL
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label));
|
||||
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam));
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled));
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf));
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glActiveTexture(GLenum texture));
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width));
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height));
|
||||
|
||||
@@ -135,6 +135,8 @@ struct GLHookSet
|
||||
PFNGLGETPROGRAMRESOURCEIVPROC glGetProgramResourceiv;
|
||||
PFNGLGETPROGRAMRESOURCENAMEPROC glGetProgramResourceName;
|
||||
PFNGLDEBUGMESSAGECALLBACKPROC glDebugMessageCallback; // aliases glDebugMessageCallbackARB
|
||||
PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl;
|
||||
PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert;
|
||||
PFNGLGETOBJECTLABELPROC glGetObjectLabel;
|
||||
PFNGLOBJECTLABELPROC glObjectLabel;
|
||||
PFNGLENABLEIPROC glEnablei;
|
||||
|
||||
@@ -147,6 +147,8 @@
|
||||
HookExtension(PFNGLGETPROGRAMRESOURCENAMEPROC, glGetProgramResourceName); \
|
||||
HookExtension(PFNGLDEBUGMESSAGECALLBACKPROC, glDebugMessageCallback); \
|
||||
HookExtensionAlias(PFNGLDEBUGMESSAGECALLBACKPROC, glDebugMessageCallback, glDebugMessageCallbackARB); \
|
||||
HookExtension(PFNGLDEBUGMESSAGECONTROLPROC, glDebugMessageControl); \
|
||||
HookExtension(PFNGLDEBUGMESSAGEINSERTPROC, glDebugMessageInsert); \
|
||||
HookExtension(PFNGLGETOBJECTLABELPROC, glGetObjectLabel); \
|
||||
HookExtension(PFNGLOBJECTLABELPROC, glObjectLabel); \
|
||||
HookExtension(PFNGLENABLEIPROC, glEnablei); \
|
||||
@@ -396,6 +398,8 @@
|
||||
HookWrapper8(void, glGetProgramResourceiv, GLuint, program, GLenum, programInterface, GLuint, index, GLsizei, propCount, const GLenum *, props, GLsizei, bufSize, GLsizei *, length, GLint *, params); \
|
||||
HookWrapper6(void, glGetProgramResourceName, GLuint, program, GLenum, programInterface, GLuint, index, GLsizei, bufSize, GLsizei *, length, GLchar *, name); \
|
||||
HookWrapper2(void, glDebugMessageCallback, GLDEBUGPROC, callback, const void *, userParam); \
|
||||
HookWrapper6(void, glDebugMessageControl, GLenum, source, GLenum, type, GLenum, severity, GLsizei, count, const GLuint *, ids, GLboolean, enabled); \
|
||||
HookWrapper6(void, glDebugMessageInsert, GLenum, source, GLenum, type, GLuint, id, GLenum, severity, GLsizei, length, const GLchar *, buf); \
|
||||
HookWrapper5(void, glGetObjectLabel, GLenum, identifier, GLuint, name, GLsizei, bufSize, GLsizei *, length, GLchar *, label); \
|
||||
HookWrapper4(void, glObjectLabel, GLenum, identifier, GLuint, name, GLsizei, length, const GLchar *, label); \
|
||||
HookWrapper2(void, glEnablei, GLenum, target, GLuint, index); \
|
||||
|
||||
Reference in New Issue
Block a user