Browse Source

Properly initialize debug group implementation pointers in all cases.

Caused crash when using debug groups on platforms without KHR_debug.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
e2bee28aa0
  1. 10
      src/Magnum/Implementation/DebugState.cpp

10
src/Magnum/Implementation/DebugState.cpp

@ -63,14 +63,22 @@ DebugState::DebugState(Context& context, std::vector<std::string>& extensions):
if(context.isExtensionSupported<Extensions::GL::EXT::debug_marker>()) {
extensions.push_back(Extensions::GL::EXT::debug_marker::string());
pushGroupImplementation = &DebugGroup::pushImplementationExt;
popGroupImplementation = &DebugGroup::popImplementationExt;
messageInsertImplementation = &DebugMessage::insertImplementationExt;
#ifndef MAGNUM_TARGET_GLES
} else if(context.isExtensionSupported<Extensions::GL::GREMEDY::string_marker>()) {
extensions.push_back(Extensions::GL::GREMEDY::string_marker::string());
pushGroupImplementation = &DebugGroup::pushImplementationNoOp;
popGroupImplementation = &DebugGroup::popImplementationNoOp;
messageInsertImplementation = &DebugMessage::insertImplementationGremedy;
#endif
} else messageInsertImplementation = &DebugMessage::insertImplementationNoOp;
} else {
pushGroupImplementation = &DebugGroup::pushImplementationNoOp;
popGroupImplementation = &DebugGroup::popImplementationNoOp;
messageInsertImplementation = &DebugMessage::insertImplementationNoOp;
}
controlImplementation = &DebugOutput::controlImplementationNoOp;
callbackImplementation = &DebugOutput::callbackImplementationNoOp;

Loading…
Cancel
Save