Inertia's picture

[ARB] Debug Output

Project:The Open Toolkit library
Version:1.1-2014-01-02
Component:Code
Category:task
Priority:minor
Assigned:Unassigned
Status:closed
Description

http://www.opengl.org/registry/specs/ARB/debug_output.txt

---

Note: Spec suggests that this extension is only available when a GL context is created with the debug flag (for performance reasons)

Tokens:

Add to enum EnableCap:

DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242

Add to enum GetPName:

MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
DEBUG_LOGGED_MESSAGES_ARB 0x9145
DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243

Create new enum DebugCallback and add:

DEBUG_CALLBACK_FUNCTION_ARB 0x8244
DEBUG_CALLBACK_USER_PARAM_ARB 0x8245

Create new enum DebugSource and add:

DEBUG_SOURCE_API_ARB 0x8246
DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
DEBUG_SOURCE_APPLICATION_ARB 0x824A
DEBUG_SOURCE_OTHER_ARB 0x824B

Create new enum DebugType and add:

DEBUG_TYPE_ERROR_ARB 0x824C
DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
DEBUG_TYPE_PORTABILITY_ARB 0x824F
DEBUG_TYPE_PERFORMANCE_ARB 0x8250
DEBUG_TYPE_OTHER_ARB 0x8251

Create new enum DebugSeverity and add:

DEBUG_SEVERITY_HIGH_ARB 0x9146
DEBUG_SEVERITY_MEDIUM_ARB 0x9147
DEBUG_SEVERITY_LOW_ARB 0x9148

Functions:

Old: void DebugMessageControlARB(enum source, enum type, enum severity, sizei count, const uint* ids, boolean enabled);
New: void DebugMessageControlARB(DebugSource source, DebugType type, DebugSeverity severity, sizei count, const uint* ids, boolean enabled);

Old: void DebugMessageInsertARB(enum source, enum type, uint id, enum severity, sizei length, const char* buf);
New: void DebugMessageInsertARB(DebugSource source, DebugType type, uint id, DebugSeverity severity, sizei length, const char* buf);

Old: uint GetDebugMessageLogARB(uint count, sizei bufsize, enum* sources, enum* types, uint* ids, enum* severities, sizei* lengths, char* messageLog);
New: uint GetDebugMessageLogARB(uint count, sizei bufsize, DebugSource* sources, DebugType* types, uint* ids, DebugSeverity* severities, sizei* lengths, char* messageLog);

Old: void GetPointerv(enum pname, void** params);
New: void GetPointerv(DebugCallback pname, void** params);

void DebugMessageCallbackARB(DEBUGPROCARB callback, void* userParam);

The callback function that applications can define, and is accepted by DebugMessageCallbackARB, is defined as:

typedef void (APIENTRY *GLDEBUGPROCARB)(DebugSource source, DebugType type, GLuint id, DebugSeverity severity, GLsizei length, const GLchar* message, GLvoid* userParam);

Note that this function pointer is defined as having the same calling convention as the GL functions.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

#1

Status:open» postponed

Postponing this until debug output is added to OpenGL core.

the Fiddler's picture

#2

Status:postponed» fixed

This is implemented as of https://github.com/thefiddler/opentk/commit/816f1e5c7f64fbfc4200f0ad184c...

the Fiddler's picture

#3

Version:1.x-dev» 1.1-2014-01-02
Status:fixed» closed

Closing bugs fixed in OpenTK 1.1.

If this is still an issue please file a new bug report at https://github.com/opentk/opentk/issues