Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
acgl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ACGL
acgl
Commits
0669c26b
Commit
0669c26b
authored
Sep 05, 2013
by
Janis Born
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slightly better formatting of debug output in ACGL_KHR_default_debug_callback
parent
c2766df6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
src/ACGL/OpenGL/Debug.cc
src/ACGL/OpenGL/Debug.cc
+10
-11
No files found.
src/ACGL/OpenGL/Debug.cc
View file @
0669c26b
...
...
@@ -24,8 +24,8 @@ const char *debugSourceName( GLenum _source )
if
(
_source
==
GL_DEBUG_SOURCE_SHADER_COMPILER
)
return
"Shader Compiler"
;
if
(
_source
==
GL_DEBUG_SOURCE_THIRD_PARTY
)
return
"Third Party"
;
if
(
_source
==
GL_DEBUG_SOURCE_APPLICATION
)
return
"Application"
;
if
(
_source
==
GL_DEBUG_SOURCE_OTHER
)
return
"
Other
"
;
return
"
u
nknown"
;
if
(
_source
==
GL_DEBUG_SOURCE_OTHER
)
return
"
Unknown
"
;
return
"
U
nknown"
;
}
const
char
*
debugTypeName
(
GLenum
_type
)
...
...
@@ -33,11 +33,11 @@ const char *debugTypeName( GLenum _type )
if
(
_type
==
GL_DEBUG_TYPE_ERROR
)
return
"Error"
;
if
(
_type
==
GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR
)
return
"Deprecated Behavior"
;
if
(
_type
==
GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR
)
return
"Undefined Behavior"
;
if
(
_type
==
GL_DEBUG_TYPE_PORTABILITY
)
return
"Portability"
;
if
(
_type
==
GL_DEBUG_TYPE_PERFORMANCE
)
return
"Performance"
;
if
(
_type
==
GL_DEBUG_TYPE_OTHER
)
return
"Other"
;
if
(
_type
==
GL_DEBUG_TYPE_PORTABILITY
)
return
"Portability Issue"
;
if
(
_type
==
GL_DEBUG_TYPE_PERFORMANCE
)
return
"Performance Issue"
;
if
(
_type
==
GL_DEBUG_TYPE_MARKER
)
return
"Marker"
;
return
"unknown"
;
if
(
_type
==
GL_DEBUG_TYPE_OTHER
)
return
"Issue"
;
return
"Issue"
;
}
const
char
*
debugSeverityName
(
GLenum
_type
)
...
...
@@ -67,11 +67,10 @@ void ACGLRegisterDefaultDebugCallback()
//! place a brakepoint in here to find the source of a problem!
void
ACGL_KHR_default_debug_callback
(
GLenum
_source
,
GLenum
_type
,
GLuint
_id
,
GLenum
_severity
,
GLsizei
_length
,
const
GLchar
*
_message
,
const
void
*
_userParam
)
{
if
(
_type
==
GL_DEBUG_TYPE_ERROR
)
{
error
()
<<
"<"
<<
_id
<<
"> severity: "
<<
debugSeverityName
(
_severity
)
<<
" source: "
<<
debugSourceName
(
_source
)
<<
": "
<<
_message
<<
endl
;
}
else
{
debug
()
<<
"<"
<<
_id
<<
"> severity: "
<<
debugSeverityName
(
_severity
)
<<
" source: "
<<
debugSourceName
(
_source
)
<<
": "
<<
_message
<<
endl
;
}
ostream
&
stream
=
(
_type
==
GL_DEBUG_TYPE_ERROR
)
?
static_cast
<
ostream
&>
(
error
())
:
static_cast
<
ostream
&>
(
debug
());
stream
<<
debugSourceName
(
_source
)
<<
" "
<<
debugTypeName
(
_type
)
<<
": "
<<
_message
<<
" (id: "
<<
_id
<<
", severity: "
<<
debugSeverityName
(
_severity
)
<<
")"
<<
endl
;
// delete all errors to not create another error log for the same problem:
while
(
glGetError
()
!=
GL_NO_ERROR
)
{}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment