Browse Source

Platform: properly initialize a value.

inverted-ranges
Vladimír Vondruš 8 years ago
parent
commit
5319e6bb1c
  1. 2
      doc/changelog.dox
  2. 4
      src/Magnum/Platform/GlfwApplication.cpp
  3. 3
      src/Magnum/Platform/GlfwApplication.h

2
doc/changelog.dox

@ -340,6 +340,8 @@ See also:
- @ref Platform::GlfwApplication::exec() now asserts instead of crashing if - @ref Platform::GlfwApplication::exec() now asserts instead of crashing if
the constructor fails to create a window (see [mosra/magnum#192](https://github.com/mosra/magnum/issues/192), the constructor fails to create a window (see [mosra/magnum#192](https://github.com/mosra/magnum/issues/192),
[mosra/magnum#272](https://github.com/mosra/magnum/pull/272)) [mosra/magnum#272](https://github.com/mosra/magnum/pull/272))
- @ref Platform::GlfwApplication::GLConfiguration::isSrgbCapable() has now
a proper documented default value instead of being left uninitialized.
- @ref Math::sclerp() was not properly interpolating the translation if - @ref Math::sclerp() was not properly interpolating the translation if
rotation was the same on both sides rotation was the same on both sides

4
src/Magnum/Platform/GlfwApplication.cpp

@ -621,7 +621,7 @@ void GlfwApplication::textInputEvent(TextInputEvent&) {}
#ifdef MAGNUM_TARGET_GL #ifdef MAGNUM_TARGET_GL
GlfwApplication::GLConfiguration::GLConfiguration(): GlfwApplication::GLConfiguration::GLConfiguration():
_colorBufferSize{8, 8, 8, 0}, _depthBufferSize{24}, _stencilBufferSize{0}, _colorBufferSize{8, 8, 8, 0}, _depthBufferSize{24}, _stencilBufferSize{0},
_sampleCount{0}, _version{GL::Version::None} {} _sampleCount{0}, _version{GL::Version::None}, _srgbCapable{false} {}
GlfwApplication::GLConfiguration::~GLConfiguration() = default; GlfwApplication::GLConfiguration::~GLConfiguration() = default;
#endif #endif
@ -633,7 +633,7 @@ GlfwApplication::Configuration::Configuration():
_dpiScalingPolicy{DpiScalingPolicy::Default}, _dpiScalingPolicy{DpiScalingPolicy::Default},
_cursorMode{CursorMode::Normal} _cursorMode{CursorMode::Normal}
#if defined(MAGNUM_BUILD_DEPRECATED) && defined(MAGNUM_TARGET_GL) #if defined(MAGNUM_BUILD_DEPRECATED) && defined(MAGNUM_TARGET_GL)
, _sampleCount{0}, _version{GL::Version::None} , _sampleCount{0}, _version{GL::Version::None}, _srgbCapable{false}
#endif #endif
{} {}

3
src/Magnum/Platform/GlfwApplication.h

@ -705,6 +705,9 @@ class GlfwApplication::GLConfiguration {
/** /**
* @brief Set sRGB-capable default framebuffer * @brief Set sRGB-capable default framebuffer
*
* Default is @cpp false @ce. See also
* @ref GL::Renderer::Feature::FramebufferSrgb.
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
*/ */
GLConfiguration& setSrgbCapable(bool enabled) { GLConfiguration& setSrgbCapable(bool enabled) {

Loading…
Cancel
Save