24#ifndef PXR_IMAGING_GLF_DIAGNOSTIC_H
25#define PXR_IMAGING_GLF_DIAGNOSTIC_H
30#include "pxr/imaging/glf/api.h"
31#include "pxr/imaging/garch/glApi.h"
37PXR_NAMESPACE_OPEN_SCOPE
43#define GLF_POST_PENDING_GL_ERRORS() \
44 GlfPostPendingGLErrors(__ARCH_PRETTY_FUNCTION__)
60 GLenum source, GLenum type, GLuint
id, GLenum severity,
61 GLsizei length,
char const * message, GLvoid
const * userParam);
68#define GLF_GROUP_FUNCTION() \
69 GlfDebugGroup __glf_group_function(__ARCH_PRETTY_FUNCTION__)
72#define GLF_GROUP_SCOPE(str) \
73 GlfDebugGroup __glf_group_scope(str)
171PXR_NAMESPACE_CLOSE_SCOPE
Low-level utilities for informing users of various internal and external diagnostic conditions.
Represents a GL debug group in Glf.
GLF_API GlfDebugGroup(char const *message)
Pushes a new debug group onto the GL api debug trace stack.
GLF_API ~GlfDebugGroup()
Pops a debug group off the GL api debug trace stack.
Represents a GL query object in Glf.
GLF_API void BeginPrimitivesGenerated()
equivalent to Begin(GL_PRIMITIVES_GENERATED).
GLF_API void Begin(GLenum target)
Begin query for the given target target has to be one of GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED,...
GLF_API int64_t GetResult()
Return the query result (synchronous) stalls CPU until the result becomes available.
GLF_API int64_t GetResultNoWait()
Return the query result (asynchronous) returns 0 if the result hasn't been available.
GLF_API void End()
End query.
GLF_API void BeginSamplesPassed()
equivalent to Begin(GL_SAMPLES_PASSED).
GLF_API void BeginTimeElapsed()
equivalent to Begin(GL_TIME_ELAPSED).
GLF_API void GlfDebugLabelBuffer(GLuint id, char const *label)
Label a buffer object to improve tracing in the debug output.
GLF_API void GlfDebugLabelProgram(GLuint id, char const *label)
Label a program object to improve tracing in the debug output.
GLF_API char const * GlfDebugEnumToString(GLenum debugEnum)
Returns a string representation of debug output enum values.
GLF_API void GlfRegisterDefaultDebugOutputMessageCallback()
Registers GlfDefaultDebugOutputMessageCallback as the debug message callback for the current GL conte...
GLF_API void GlfDefaultDebugOutputMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, char const *message, GLvoid const *userParam)
A GL debug output message callback method which posts diagnostic errors for messages of type DEBUG_TY...
GLF_API void GlfPostPendingGLErrors(std::string const &where=std::string())
Posts diagnostic errors for all GL errors in the current context.
GLF_API void GlfDebugLabelShader(GLuint id, char const *label)
Label a shader object to improve tracing in the debug output.