Browse Source

Platform: make EmscriptenApplication work correctly w/o TARGET_GL.

pull/300/head
Vladimír Vondruš 7 years ago
parent
commit
fd137f3cf1
  1. 2
      src/Magnum/Platform/EmscriptenApplication.cpp
  2. 7
      src/Magnum/Platform/EmscriptenApplication.h

2
src/Magnum/Platform/EmscriptenApplication.cpp

@ -477,8 +477,10 @@ void EmscriptenApplication::mouseMoveEvent(MouseMoveEvent&) {}
void EmscriptenApplication::mouseScrollEvent(MouseScrollEvent&) {}
void EmscriptenApplication::textInputEvent(TextInputEvent&) {}
#ifdef MAGNUM_TARGET_GL
EmscriptenApplication::GLConfiguration::GLConfiguration():
_colorBufferSize{8, 8, 8, 0}, _depthBufferSize{24}, _stencilBufferSize{0} {}
#endif
void EmscriptenApplication::mainLoopIteration() {
/* The resize event is not fired on window resize, so poll for the canvas

7
src/Magnum/Platform/EmscriptenApplication.h

@ -513,10 +513,16 @@ class EmscriptenApplication {
CORRADE_ENUMSET_OPERATORS(EmscriptenApplication::Flags)
#ifdef MAGNUM_TARGET_GL
/**
@brief WebGL context configuration
The created context is always with a double-buffered OpenGL context.
@note This function is available only if Magnum is compiled with
@ref MAGNUM_TARGET_GL enabled (done by default). See @ref building-features
for more information.
@see @ref EmscriptenApplication(), @ref Configuration, @ref create(),
@ref tryCreate()
*/
@ -713,6 +719,7 @@ class EmscriptenApplication::GLConfiguration {
};
CORRADE_ENUMSET_OPERATORS(EmscriptenApplication::GLConfiguration::Flags)
#endif
/**
@brief Configuration

Loading…
Cancel
Save