|
|
|
|
@ -25,6 +25,7 @@
|
|
|
|
|
|
|
|
|
|
#include "DebugOutput.h" |
|
|
|
|
|
|
|
|
|
#ifndef MAGNUM_TARGET_WEBGL |
|
|
|
|
#include <Corrade/Utility/Assert.h> |
|
|
|
|
|
|
|
|
|
#include "Magnum/Context.h" |
|
|
|
|
@ -40,7 +41,7 @@ namespace Magnum {
|
|
|
|
|
|
|
|
|
|
namespace { |
|
|
|
|
|
|
|
|
|
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) |
|
|
|
|
#ifndef CORRADE_TARGET_NACL |
|
|
|
|
void |
|
|
|
|
#ifdef CORRADE_TARGET_WINDOWS |
|
|
|
|
APIENTRY |
|
|
|
|
@ -169,7 +170,7 @@ void DebugOutput::setEnabledInternal(const GLenum source, const GLenum type, con
|
|
|
|
|
void DebugOutput::controlImplementationNoOp(GLenum, GLenum, GLenum, std::initializer_list<UnsignedInt>, bool) {} |
|
|
|
|
|
|
|
|
|
void DebugOutput::controlImplementationKhr(const GLenum source, const GLenum type, const GLenum severity, const std::initializer_list<UnsignedInt> ids, const bool enabled) { |
|
|
|
|
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) |
|
|
|
|
#ifndef CORRADE_TARGET_NACL |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
glDebugMessageControl |
|
|
|
|
#else |
|
|
|
|
@ -195,7 +196,7 @@ void DebugOutput::callbackImplementationKhr(const Callback callback, const void*
|
|
|
|
|
|
|
|
|
|
/* Adding callback */ |
|
|
|
|
if(!original && callback) { |
|
|
|
|
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) |
|
|
|
|
#ifndef CORRADE_TARGET_NACL |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
glDebugMessageCallback |
|
|
|
|
#else |
|
|
|
|
@ -209,7 +210,7 @@ void DebugOutput::callbackImplementationKhr(const Callback callback, const void*
|
|
|
|
|
|
|
|
|
|
/* Deleting callback */ |
|
|
|
|
} else if(original && !callback) { |
|
|
|
|
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) |
|
|
|
|
#ifndef CORRADE_TARGET_NACL |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
glDebugMessageCallback |
|
|
|
|
#else |
|
|
|
|
@ -277,7 +278,7 @@ void DebugMessage::insertInternal(const Source source, const Type type, const Un
|
|
|
|
|
void DebugMessage::insertImplementationNoOp(Source, Type, UnsignedInt, DebugOutput::Severity, const Containers::ArrayReference<const char>) {} |
|
|
|
|
|
|
|
|
|
void DebugMessage::insertImplementationKhr(const Source source, const Type type, const UnsignedInt id, const DebugOutput::Severity severity, const Containers::ArrayReference<const char> string) { |
|
|
|
|
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) |
|
|
|
|
#ifndef CORRADE_TARGET_NACL |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
glDebugMessageInsert |
|
|
|
|
#else |
|
|
|
|
@ -295,7 +296,7 @@ void DebugMessage::insertImplementationKhr(const Source source, const Type type,
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DebugMessage::insertImplementationExt(Source, Type, UnsignedInt, DebugOutput::Severity, const Containers::ArrayReference<const char> string) { |
|
|
|
|
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) |
|
|
|
|
#ifndef CORRADE_TARGET_NACL |
|
|
|
|
glInsertEventMarkerEXT(string.size(), string.data()); |
|
|
|
|
#else |
|
|
|
|
static_cast<void>(string); |
|
|
|
|
@ -377,7 +378,7 @@ void DebugGroup::pop() {
|
|
|
|
|
void DebugGroup::pushImplementationNoOp(Source, UnsignedInt, Containers::ArrayReference<const char>) {} |
|
|
|
|
|
|
|
|
|
void DebugGroup::pushImplementationKhr(const Source source, const UnsignedInt id, const Containers::ArrayReference<const char> message) { |
|
|
|
|
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) |
|
|
|
|
#ifndef CORRADE_TARGET_NACL |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
glPushDebugGroup |
|
|
|
|
#else |
|
|
|
|
@ -393,7 +394,7 @@ void DebugGroup::pushImplementationKhr(const Source source, const UnsignedInt id
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DebugGroup::pushImplementationExt(Source, UnsignedInt, const Containers::ArrayReference<const char> message) { |
|
|
|
|
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) |
|
|
|
|
#ifndef CORRADE_TARGET_NACL |
|
|
|
|
glPushGroupMarkerEXT(message.size(), message.data()); |
|
|
|
|
#else |
|
|
|
|
static_cast<void>(message); |
|
|
|
|
@ -406,7 +407,7 @@ void DebugGroup::popImplementationNoOp() {}
|
|
|
|
|
void DebugGroup::popImplementationKhr() { |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
glPopDebugGroup(); |
|
|
|
|
#elif !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) |
|
|
|
|
#elif !defined(CORRADE_TARGET_NACL) |
|
|
|
|
glPopDebugGroupKHR(); |
|
|
|
|
#else |
|
|
|
|
CORRADE_ASSERT_UNREACHABLE(); |
|
|
|
|
@ -414,7 +415,7 @@ void DebugGroup::popImplementationKhr() {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DebugGroup::popImplementationExt() { |
|
|
|
|
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) |
|
|
|
|
#ifndef CORRADE_TARGET_NACL |
|
|
|
|
glPopGroupMarkerEXT(); |
|
|
|
|
#else |
|
|
|
|
CORRADE_ASSERT_UNREACHABLE(); |
|
|
|
|
@ -435,3 +436,4 @@ Debug operator<<(Debug debug, const DebugGroup::Source value) {
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|