Loading...
Searching...
No Matches
diagnostic.h File Reference
+ Include dependency graph for diagnostic.h:

Go to the source code of this file.

Classes

class  GlfDebugGroup
 Represents a GL debug group in Glf. More...
 
class  GlfGLQueryObject
 Represents a GL query object in Glf. More...
 

Macros

#define GLF_POST_PENDING_GL_ERRORS()    GlfPostPendingGLErrors(__ARCH_PRETTY_FUNCTION__)
 Posts diagnostic errors for all GL errors in the current context.
 
#define GLF_GROUP_FUNCTION()    GlfDebugGroup __glf_group_function(__ARCH_PRETTY_FUNCTION__)
 Emit a GlfDebugGroup tracing the current function.
 
#define GLF_GROUP_SCOPE(str)    GlfDebugGroup __glf_group_scope(str)
 Emit a GlfDebugGroup tracing the current scope with the given string.
 

Functions

GLF_API void GlfPostPendingGLErrors (std::string const &where=std::string())
 Posts diagnostic errors for all GL errors in the current context.
 
GLF_API void GlfRegisterDefaultDebugOutputMessageCallback ()
 Registers GlfDefaultDebugOutputMessageCallback as the debug message callback for the current GL context.
 
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_TYPE_ERROR and diagnostic warnings for other message types.
 
GLF_API char const * GlfDebugEnumToString (GLenum debugEnum)
 Returns a string representation of debug output enum values.
 
GLF_API void GlfDebugLabelBuffer (GLuint id, char const *label)
 Label a buffer object to improve tracing in the debug output.
 
GLF_API void GlfDebugLabelShader (GLuint id, char const *label)
 Label a shader 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.
 

Macro Definition Documentation

◆ GLF_GROUP_FUNCTION

#define GLF_GROUP_FUNCTION ( )     GlfDebugGroup __glf_group_function(__ARCH_PRETTY_FUNCTION__)

Emit a GlfDebugGroup tracing the current function.

Definition at line 68 of file diagnostic.h.

◆ GLF_GROUP_SCOPE

#define GLF_GROUP_SCOPE (   str)     GlfDebugGroup __glf_group_scope(str)

Emit a GlfDebugGroup tracing the current scope with the given string.

Definition at line 72 of file diagnostic.h.

◆ GLF_POST_PENDING_GL_ERRORS

#define GLF_POST_PENDING_GL_ERRORS ( )     GlfPostPendingGLErrors(__ARCH_PRETTY_FUNCTION__)

Posts diagnostic errors for all GL errors in the current context.

This macro tags the diagnostic errors with the name of the calling function.

Definition at line 43 of file diagnostic.h.

Function Documentation

◆ GlfDebugEnumToString()

GLF_API char const * GlfDebugEnumToString ( GLenum  debugEnum)

Returns a string representation of debug output enum values.

◆ GlfDebugLabelBuffer()

GLF_API void GlfDebugLabelBuffer ( GLuint  id,
char const *  label 
)

Label a buffer object to improve tracing in the debug output.

◆ GlfDebugLabelProgram()

GLF_API void GlfDebugLabelProgram ( GLuint  id,
char const *  label 
)

Label a program object to improve tracing in the debug output.

◆ GlfDebugLabelShader()

GLF_API void GlfDebugLabelShader ( GLuint  id,
char const *  label 
)

Label a shader object to improve tracing in the debug output.

◆ GlfDefaultDebugOutputMessageCallback()

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_TYPE_ERROR and diagnostic warnings for other message types.

◆ GlfPostPendingGLErrors()

GLF_API void GlfPostPendingGLErrors ( std::string const &  where = std::string())

Posts diagnostic errors for all GL errors in the current context.

◆ GlfRegisterDefaultDebugOutputMessageCallback()

GLF_API void GlfRegisterDefaultDebugOutputMessageCallback ( )

Registers GlfDefaultDebugOutputMessageCallback as the debug message callback for the current GL context.