struct Gloop::Debug
- Gloop::Debug
- Struct
- Value
- Object
Overview
Interacts with OpenGL's debugging features.
See: https://www.khronos.org/opengl/wiki/Debug_Output
Included Modules
- Gloop::Capabilities
- Gloop::Contextual
Defined in:
gloop/debug.crgloop/debug/message.cr
gloop/debug/message_iterator.cr
gloop/debug/severity.cr
gloop/debug/source.cr
gloop/debug/type.cr
Constructors
-
.new(context : Gloop::Context)
Creates a resource associated with a context.
Instance Method Summary
-
#allow(ids : Indexable(UInt32), *, source : Source = :dont_care, type : Type = :dont_care) : Nil
Specifies IDs of debug messages to receive.
-
#allow(*, source : Source = :dont_care, type : Type = :dont_care, severity : Severity = :dont_care) : Nil
Specifies debug messages to receive.
-
#clear : Nil
Removes all pending debug messages from the queue.
-
#clear_on_message : Nil
Clears a previously set callback.
-
#disable : Nil
Disables the capability.
-
#disable_sync
Disables the sync capability.
-
#enable : Nil
Enables the capability.
-
#enable_sync
Enables the sync capability.
-
#enabled=(flag)
Enables or disables the capability depending on flag.
-
#enabled?
Checks if the capability is enabled.
-
#group(message, source : Source = :application, id : UInt32 = 0, &)
Pushes a debug group onto the stack and yields.
-
#insert(message) : Nil
Sends a debug message to OpenGL's debug message queue.
-
#log(message, *, severity : Severity = :notification, type : Type = :other, source : Source = :application, id : UInt32 = 0) : Nil
Sends a debug message to OpenGL's debug message queue.
-
#messages : MessageIterator
Provides access to all pending debug messages in the queue.
-
#on_message(&block : Message -> ) : Nil
Sets a callback to be invoked when OpenGL sends a debug message.
-
#pop : Nil
Pops a debug group off of the stack.
-
#push(message, source : Source = :application, id : UInt32 = 0) : Nil
Pushes a debug group onto the stack.
-
#reject(ids : Indexable(UInt32), *, source : Source = :dont_care, type : Type = :dont_care) : Nil
Specifies IDs of debug messages to ignore.
-
#reject(*, source : Source = :dont_care, type : Type = :dont_care, severity : Severity = :dont_care) : Nil
Specifies debug messages to ignore.
-
#sync=(flag)
Enables or disables the sync capability depending on flag.
-
#sync?
Checks if the sync capability is enabled.
Constructor Detail
Instance Method Detail
Specifies IDs of debug messages to receive.
Messages can be allowed by specifying any combination of source and type flags.
NOTE Severity cannot be set with this method.
See: #reject
- OpenGL function:
glDebugMessageControl
- OpenGL version: 4.3
Specifies debug messages to receive.
Messages can be allowed by specifying any combination of source, type, and severity flags.
See: #reject
- OpenGL function:
glDebugMessageControl
- OpenGL version: 4.3
Clears a previously set callback.
This effectively undoes #on_message
.
It is recommended to call this method before cleaning up the OpenGL context.
- OpenGL function:
glDebugMessageCallback
- OpenGL version: 4.3
Disables the capability.
- OpenGL function:
glDisable
- OpenGL enum:
GL_DEBUG_OUTPUT
- OpenGL version: 4.3
Disables the sync capability.
- OpenGL function:
glDisable
- OpenGL enum:
GL_DEBUG_OUTPUT_SYNCHRONOUS
- OpenGL version: 4.3
Enables the capability.
- OpenGL function:
glEnable
- OpenGL enum:
GL_DEBUG_OUTPUT
- OpenGL version: 4.3
Enables the sync capability.
- OpenGL function:
glEnable
- OpenGL enum:
GL_DEBUG_OUTPUT_SYNCHRONOUS
- OpenGL version: 4.3
Checks if the capability is enabled.
- OpenGL function:
glIsEnabled
- OpenGL enum:
GL_DEBUG_OUTPUT
- OpenGL version: 4.3
Pushes a debug group onto the stack and yields. Pops the debug group after the block returns.
Sends a debug message to OpenGL's debug message queue.
See: Message#insert
Sends a debug message to OpenGL's debug message queue.
See: Message#insert
Sets a callback to be invoked when OpenGL sends a debug message.
The block provided to this method will be called when a message is received.
This method returns immediately after the callback has been established.
Subsequent calls to this method will overwrite the previous callback.
Only one callback (the latest) will be invoked.
The block will be given a Message
instance containing the debug message as an argument.
- OpenGL function:
glDebugMessageCallback
- OpenGL version: 4.3
Pops a debug group off of the stack.
- OpenGL function:
glPopDebugGroup
- OpenGL version: 4.3
Pushes a debug group onto the stack.
- OpenGL function:
glPushDebugGroup
- OpenGL version: 4.3
Specifies IDs of debug messages to ignore.
Messages can be ignored by specifying any combination of source and type flags.
NOTE Severity cannot be set with this method.
See: #reject
- OpenGL function:
glDebugMessageControl
- OpenGL version: 4.3
Specifies debug messages to ignore.
Messages can be ignored by specifying any combination of source, type, and severity flags.
See: #reject
- OpenGL function:
glDebugMessageControl
- OpenGL version: 4.3
Checks if the sync capability is enabled.
- OpenGL function:
glIsEnabled
- OpenGL enum:
GL_DEBUG_OUTPUT_SYNCHRONOUS
- OpenGL version: 4.3