Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ACGL
acgl
Commits
32d9b53a
Commit
32d9b53a
authored
Nov 27, 2013
by
Robert Menzel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reverted to 'worse formatting' so we have a place to put out brakepoint again...
parent
e0f431e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
src/ACGL/OpenGL/Debug.cc
src/ACGL/OpenGL/Debug.cc
+10
-3
No files found.
src/ACGL/OpenGL/Debug.cc
View file @
32d9b53a
...
@@ -65,11 +65,18 @@ void ACGLRegisterDefaultDebugCallback()
...
@@ -65,11 +65,18 @@ void ACGLRegisterDefaultDebugCallback()
}
}
//! place a brakepoint in here to find the source of a problem!
//! place a brakepoint in here to find the source of a problem!
void
APIENTRY
ACGL_KHR_default_debug_callback
(
GLenum
_source
,
GLenum
_type
,
GLuint
_id
,
GLenum
_severity
,
GLsizei
_length
,
const
GLchar
*
_message
,
const
void
*
_userParam
)
void
APIENTRY
ACGL_KHR_default_debug_callback
(
GLenum
_source
,
GLenum
_type
,
GLuint
_id
,
GLenum
_severity
,
GLsizei
/*
_length
*/
,
const
GLchar
*
_message
,
const
void
*
/*
_userParam
*/
)
{
{
ostream
&
stream
=
(
_type
==
GL_DEBUG_TYPE_ERROR
)
?
static_cast
<
ostream
&>
(
error
())
:
static_cast
<
ostream
&>
(
debug
());
// yes, this could be implemented with less dublicated code, but the
// point here is to have one code path which gets only called in case of an error
// so we have a convenient place to put out brakepoint and haing the error message to
// be printed first...
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
;
}
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:
// delete all errors to not create another error log for the same problem:
while
(
glGetError
()
!=
GL_NO_ERROR
)
{}
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