Browse Source

Platform: mark GLFW 3.2 as oldest supported, drop older workarounds.

Ubuntu 18.04 has 3.2 so this should be safe. Need to use
glfwGetKeyName() to undo keyboard layout weirdness, would be nasty to
have to make a fallback for older versions.
pull/651/head
Vladimír Vondruš 2 years ago
parent
commit
5894beaeb2
  1. 2
      doc/changelog.dox
  2. 21
      src/Magnum/Platform/GlfwApplication.cpp
  3. 40
      src/Magnum/Platform/GlfwApplication.h
  4. 24
      src/Magnum/Platform/Test/GlfwApplicationTest.cpp

2
doc/changelog.dox

@ -56,6 +56,8 @@ See also:
which is from 2011) has been dropped from @ref Platform::AndroidApplication. which is from 2011) has been dropped from @ref Platform::AndroidApplication.
- Support for SDL2 older than 2.0.6 (released in 2017) has been dropped from - Support for SDL2 older than 2.0.6 (released in 2017) has been dropped from
@ref Platform::Sdl2Application. @ref Platform::Sdl2Application.
- Support for GLFW older than 3.2 (released in 2016) has been dropped from
@ref Platform::GlfwApplication.
@subsection changelog-latest-new New features @subsection changelog-latest-new New features

21
src/Magnum/Platform/GlfwApplication.cpp

@ -265,7 +265,6 @@ void GlfwApplication::setWindowTitle(const Containers::StringView title) {
glfwSetWindowTitle(_window, Containers::String::nullTerminatedView(title).data()); glfwSetWindowTitle(_window, Containers::String::nullTerminatedView(title).data());
} }
#if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
void GlfwApplication::setWindowIcon(const ImageView2D& image) { void GlfwApplication::setWindowIcon(const ImageView2D& image) {
setWindowIcon({&image, 1}); setWindowIcon({&image, 1});
} }
@ -325,14 +324,10 @@ void GlfwApplication::setWindowIcon(const Containers::ArrayView<const ImageView2
void GlfwApplication::setWindowIcon(std::initializer_list<ImageView2D> images) { void GlfwApplication::setWindowIcon(std::initializer_list<ImageView2D> images) {
setWindowIcon(Containers::arrayView(images)); setWindowIcon(Containers::arrayView(images));
} }
#endif
bool GlfwApplication::tryCreate(const Configuration& configuration) { bool GlfwApplication::tryCreate(const Configuration& configuration) {
#ifdef MAGNUM_TARGET_GL #ifdef MAGNUM_TARGET_GL
#ifdef GLFW_NO_API if(!(configuration.windowFlags() & Configuration::WindowFlag::Contextless)) {
if(!(configuration.windowFlags() & Configuration::WindowFlag::Contextless))
#endif
{
return tryCreate(configuration, GLConfiguration{}); return tryCreate(configuration, GLConfiguration{});
} }
#endif #endif
@ -355,17 +350,13 @@ bool GlfwApplication::tryCreate(const Configuration& configuration) {
glfwWindowHint(GLFW_DECORATED, !(flags >= Configuration::WindowFlag::Borderless)); glfwWindowHint(GLFW_DECORATED, !(flags >= Configuration::WindowFlag::Borderless));
glfwWindowHint(GLFW_RESIZABLE, flags >= Configuration::WindowFlag::Resizable); glfwWindowHint(GLFW_RESIZABLE, flags >= Configuration::WindowFlag::Resizable);
glfwWindowHint(GLFW_VISIBLE, !(flags >= Configuration::WindowFlag::Hidden)); glfwWindowHint(GLFW_VISIBLE, !(flags >= Configuration::WindowFlag::Hidden));
#ifdef GLFW_MAXIMIZED
glfwWindowHint(GLFW_MAXIMIZED, flags >= Configuration::WindowFlag::Maximized); glfwWindowHint(GLFW_MAXIMIZED, flags >= Configuration::WindowFlag::Maximized);
#endif
glfwWindowHint(GLFW_FLOATING, flags >= Configuration::WindowFlag::AlwaysOnTop); glfwWindowHint(GLFW_FLOATING, flags >= Configuration::WindowFlag::AlwaysOnTop);
} }
glfwWindowHint(GLFW_FOCUSED, configuration.windowFlags() >= Configuration::WindowFlag::Focused); glfwWindowHint(GLFW_FOCUSED, configuration.windowFlags() >= Configuration::WindowFlag::Focused);
#ifdef GLFW_NO_API
/* Disable implicit GL context creation */ /* Disable implicit GL context creation */
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
#endif
/* Create the window */ /* Create the window */
CORRADE_INTERNAL_ASSERT(configuration.title().flags() & Containers::StringViewFlag::NullTerminated); CORRADE_INTERNAL_ASSERT(configuration.title().flags() & Containers::StringViewFlag::NullTerminated);
@ -437,9 +428,7 @@ bool GlfwApplication::tryCreate(const Configuration& configuration, const GLConf
glfwWindowHint(GLFW_DECORATED, !(flags >= Configuration::WindowFlag::Borderless)); glfwWindowHint(GLFW_DECORATED, !(flags >= Configuration::WindowFlag::Borderless));
glfwWindowHint(GLFW_RESIZABLE, flags >= Configuration::WindowFlag::Resizable); glfwWindowHint(GLFW_RESIZABLE, flags >= Configuration::WindowFlag::Resizable);
glfwWindowHint(GLFW_VISIBLE, !(flags >= Configuration::WindowFlag::Hidden)); glfwWindowHint(GLFW_VISIBLE, !(flags >= Configuration::WindowFlag::Hidden));
#ifdef GLFW_MAXIMIZED
glfwWindowHint(GLFW_MAXIMIZED, flags >= Configuration::WindowFlag::Maximized); glfwWindowHint(GLFW_MAXIMIZED, flags >= Configuration::WindowFlag::Maximized);
#endif
glfwWindowHint(GLFW_FLOATING, flags >= Configuration::WindowFlag::AlwaysOnTop); glfwWindowHint(GLFW_FLOATING, flags >= Configuration::WindowFlag::AlwaysOnTop);
} }
glfwWindowHint(GLFW_FOCUSED, configuration.windowFlags() >= Configuration::WindowFlag::Focused); glfwWindowHint(GLFW_FOCUSED, configuration.windowFlags() >= Configuration::WindowFlag::Focused);
@ -459,14 +448,10 @@ bool GlfwApplication::tryCreate(const Configuration& configuration, const GLConf
GLConfiguration::Flags glFlags = glConfiguration.flags(); GLConfiguration::Flags glFlags = glConfiguration.flags();
if((glFlags & GLConfiguration::Flag::GpuValidation) || (_context->configurationFlags() & GL::Context::Configuration::Flag::GpuValidation)) if((glFlags & GLConfiguration::Flag::GpuValidation) || (_context->configurationFlags() & GL::Context::Configuration::Flag::GpuValidation))
glFlags |= GLConfiguration::Flag::Debug; glFlags |= GLConfiguration::Flag::Debug;
#ifdef GLFW_CONTEXT_NO_ERROR
else if((glFlags & GLConfiguration::Flag::GpuValidationNoError) || (_context->configurationFlags() & GL::Context::Configuration::Flag::GpuValidationNoError)) else if((glFlags & GLConfiguration::Flag::GpuValidationNoError) || (_context->configurationFlags() & GL::Context::Configuration::Flag::GpuValidationNoError))
glFlags |= GLConfiguration::Flag::NoError; glFlags |= GLConfiguration::Flag::NoError;
#endif
#ifdef GLFW_CONTEXT_NO_ERROR
glfwWindowHint(GLFW_CONTEXT_NO_ERROR, glFlags >= GLConfiguration::Flag::NoError); glfwWindowHint(GLFW_CONTEXT_NO_ERROR, glFlags >= GLConfiguration::Flag::NoError);
#endif
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, glFlags >= GLConfiguration::Flag::Debug); glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, glFlags >= GLConfiguration::Flag::Debug);
glfwWindowHint(GLFW_STEREO, glFlags >= GLConfiguration::Flag::Stereo); glfwWindowHint(GLFW_STEREO, glFlags >= GLConfiguration::Flag::Stereo);
@ -771,7 +756,6 @@ void GlfwApplication::setWindowSize(const Vector2i& size) {
glfwSetWindowSize(_window, newSize.x(), newSize.y()); glfwSetWindowSize(_window, newSize.x(), newSize.y());
} }
#if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
void GlfwApplication::setMinWindowSize(const Vector2i& size) { void GlfwApplication::setMinWindowSize(const Vector2i& size) {
CORRADE_ASSERT(_window, "Platform::GlfwApplication::setMinWindowSize(): no window opened", ); CORRADE_ASSERT(_window, "Platform::GlfwApplication::setMinWindowSize(): no window opened", );
@ -787,7 +771,6 @@ void GlfwApplication::setMaxWindowSize(const Vector2i& size) {
glfwSetWindowSizeLimits(_window, _minWindowSize.x(), _minWindowSize.y(), newSize.x(), newSize.y()); glfwSetWindowSizeLimits(_window, _minWindowSize.x(), _minWindowSize.y(), newSize.x(), newSize.y());
_maxWindowSize = newSize; _maxWindowSize = newSize;
} }
#endif
#ifdef MAGNUM_TARGET_GL #ifdef MAGNUM_TARGET_GL
Vector2i GlfwApplication::framebufferSize() const { Vector2i GlfwApplication::framebufferSize() const {
@ -1124,7 +1107,6 @@ GlfwApplication::Configuration::Configuration():
GlfwApplication::Configuration::~Configuration() = default; GlfwApplication::Configuration::~Configuration() = default;
#if defined(DOXYGEN_GENERATING_OUTPUT) || GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
Containers::StringView GlfwApplication::KeyEvent::keyName(const Key key) { Containers::StringView GlfwApplication::KeyEvent::keyName(const Key key) {
return glfwGetKeyName(int(key), 0); return glfwGetKeyName(int(key), 0);
} }
@ -1132,7 +1114,6 @@ Containers::StringView GlfwApplication::KeyEvent::keyName(const Key key) {
Containers::StringView GlfwApplication::KeyEvent::keyName() const { Containers::StringView GlfwApplication::KeyEvent::keyName() const {
return keyName(_key); return keyName(_key);
} }
#endif
GlfwApplication::Pointers GlfwApplication::PointerMoveEvent::pointers() { GlfwApplication::Pointers GlfwApplication::PointerMoveEvent::pointers() {
if(!_pointers) if(!_pointers)

40
src/Magnum/Platform/GlfwApplication.h

@ -100,8 +100,8 @@ See @ref cmake for more information.
@section Platform-GlfwApplication-usage General usage @section Platform-GlfwApplication-usage General usage
This application library depends on the [GLFW](http://glfw.org) library and is This application library depends on [GLFW](http://glfw.org) 3.2 and newer and
built if `MAGNUM_WITH_GLFWAPPLICATION` is enabled when building Magnum. To use is built if `MAGNUM_WITH_GLFWAPPLICATION` is enabled when building Magnum. To use
this library with CMake, request the `GlfwApplication` component of the this library with CMake, request the `GlfwApplication` component of the
`Magnum` package and link to the `Magnum::GlfwApplication` target: `Magnum` package and link to the `Magnum::GlfwApplication` target:
@ -121,7 +121,7 @@ necessary.
@code{.cmake} @code{.cmake}
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
# These two will be off-by-default when GLFW 3.4 gets released # These two are be off-by-default and thus no longer needed with GLFW 3.4+
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(glfw EXCLUDE_FROM_ALL) add_subdirectory(glfw EXCLUDE_FROM_ALL)
@ -419,7 +419,6 @@ class GlfwApplication {
*/ */
void setWindowSize(const Vector2i& size); void setWindowSize(const Vector2i& size);
#if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302 || defined(DOXYGEN_GENERATING_OUTPUT)
/** /**
* @brief Set window minimum size * @brief Set window minimum size
* @param size The minimum size, in screen coordinates * @param size The minimum size, in screen coordinates
@ -429,7 +428,6 @@ class GlfwApplication {
* corresponding limit. To make the sizing work independently of the * corresponding limit. To make the sizing work independently of the
* display DPI, @p size is internally multiplied with @ref dpiScaling() * display DPI, @p size is internally multiplied with @ref dpiScaling()
* before getting applied. Expects that a window is already created. * before getting applied. Expects that a window is already created.
* @note Supported since GLFW 3.2.
* @see @ref setMaxWindowSize(), @ref setWindowSize() * @see @ref setMaxWindowSize(), @ref setWindowSize()
*/ */
void setMinWindowSize(const Vector2i& size = {-1, -1}); void setMinWindowSize(const Vector2i& size = {-1, -1});
@ -443,11 +441,9 @@ class GlfwApplication {
* corresponding limit. To make the sizing work independently of the * corresponding limit. To make the sizing work independently of the
* display DPI, @p size is internally multiplied with @ref dpiScaling() * display DPI, @p size is internally multiplied with @ref dpiScaling()
* before getting applied. Expects that a window is already created. * before getting applied. Expects that a window is already created.
* @note Supported since GLFW 3.2.
* @see @ref setMinWindowSize(), @ref setMaxWindowSize() * @see @ref setMinWindowSize(), @ref setMaxWindowSize()
*/ */
void setMaxWindowSize(const Vector2i& size = {-1, -1}); void setMaxWindowSize(const Vector2i& size = {-1, -1});
#endif
#if defined(MAGNUM_TARGET_GL) || defined(DOXYGEN_GENERATING_OUTPUT) #if defined(MAGNUM_TARGET_GL) || defined(DOXYGEN_GENERATING_OUTPUT)
/** /**
@ -497,7 +493,6 @@ class GlfwApplication {
*/ */
void setWindowTitle(Containers::StringView title); void setWindowTitle(Containers::StringView title);
#if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302 || defined(DOXYGEN_GENERATING_OUTPUT)
/** /**
* @brief Set window icon * @brief Set window icon
* @m_since_latest * @m_since_latest
@ -508,8 +503,8 @@ class GlfwApplication {
* @ref PixelFormat::RGBA8Unorm or @ref PixelFormat::RGBA8Srgb formats. * @ref PixelFormat::RGBA8Unorm or @ref PixelFormat::RGBA8Srgb formats.
* If you have just one image, you can use * If you have just one image, you can use
* @ref setWindowIcon(const ImageView2D&) instead. * @ref setWindowIcon(const ImageView2D&) instead.
* @note Available since GLFW 3.2. The function has no effect on macOS * @note The function has no effect on macOS / Wayland, see
* / Wayland, see @m_class{m-doc-external} [glfwSetWindowIcon()](https://www.glfw.org/docs/latest/group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5) * @m_class{m-doc-external} [glfwSetWindowIcon()](https://www.glfw.org/docs/latest/group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5)
* for more information. * for more information.
* @see @ref platform-windows-icon "Excecutable icon on Windows", * @see @ref platform-windows-icon "Excecutable icon on Windows",
* @ref Trade::IcoImporter "IcoImporter" * @ref Trade::IcoImporter "IcoImporter"
@ -527,7 +522,6 @@ class GlfwApplication {
* @m_since{2020,06} * @m_since{2020,06}
*/ */
void setWindowIcon(const ImageView2D& image); void setWindowIcon(const ImageView2D& image);
#endif
/** /**
* @brief Swap buffers * @brief Swap buffers
@ -1058,7 +1052,6 @@ class GlfwApplication::GLConfiguration: public GL::Context::Configuration {
ForwardCompatible = 1 << 0, ForwardCompatible = 1 << 0,
#endif #endif
#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(GLFW_CONTEXT_NO_ERROR)
/** /**
* Context without error reporting. Might result in better * Context without error reporting. Might result in better
* performance, but situations that would have generated errors * performance, but situations that would have generated errors
@ -1066,11 +1059,8 @@ class GlfwApplication::GLConfiguration: public GL::Context::Configuration {
* supported by the driver and the @ref Flag::GpuValidationNoError * supported by the driver and the @ref Flag::GpuValidationNoError
* flag is set or if the `--magnum-gpu-validation` @ref GL-Context-usage-command-line "command-line option" * flag is set or if the `--magnum-gpu-validation` @ref GL-Context-usage-command-line "command-line option"
* is set to `no-error`. * is set to `no-error`.
*
* @note Supported since GLFW 3.2.
*/ */
NoError = 1 << 1, NoError = 1 << 1,
#endif
/** /**
* Debug context. Enabled automatically if supported by the driver * Debug context. Enabled automatically if supported by the driver
@ -1313,15 +1303,7 @@ class GlfwApplication::Configuration {
Resizable = 1 << 2, /**< Resizable window */ Resizable = 1 << 2, /**< Resizable window */
Hidden = 1 << 3, /**< Hidden window */ Hidden = 1 << 3, /**< Hidden window */
Maximized = 1 << 4, /**< Maximized window */
#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(GLFW_MAXIMIZED)
/**
* Maximized window
*
* @note Supported since GLFW 3.2.
*/
Maximized = 1 << 4,
#endif
Minimized = 1 << 5, /**< Minimized window */ Minimized = 1 << 5, /**< Minimized window */
@ -1352,7 +1334,6 @@ class GlfwApplication::Configuration {
*/ */
Focused = 1 << 8, Focused = 1 << 8,
#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(GLFW_NO_API)
/** /**
* Do not create any GPU context. Use together with * Do not create any GPU context. Use together with
* @ref GlfwApplication(const Arguments&, const Configuration&), * @ref GlfwApplication(const Arguments&, const Configuration&),
@ -1362,11 +1343,8 @@ class GlfwApplication::Configuration {
* @ref GlfwApplication(const Arguments&, const Configuration&, const GLConfiguration&), * @ref GlfwApplication(const Arguments&, const Configuration&, const GLConfiguration&),
* @ref create(const Configuration&, const GLConfiguration&) or * @ref create(const Configuration&, const GLConfiguration&) or
* @ref tryCreate(const Configuration&, const GLConfiguration&). * @ref tryCreate(const Configuration&, const GLConfiguration&).
*
* @note Supported since GLFW 3.2.
*/ */
Contextless = 1 << 9 Contextless = 1 << 9
#endif
}; };
/** /**
@ -2097,7 +2075,6 @@ class GlfwApplication::KeyEvent: public GlfwApplication::InputEvent {
NumEqual = GLFW_KEY_KP_EQUAL /**< Numpad equal */ NumEqual = GLFW_KEY_KP_EQUAL /**< Numpad equal */
}; };
#if defined(DOXYGEN_GENERATING_OUTPUT) || GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
/** /**
* @brief Name for given key * @brief Name for given key
* *
@ -2108,15 +2085,12 @@ class GlfwApplication::KeyEvent: public GlfwApplication::InputEvent {
* and is valid until the keyboard layout is changed or the application * and is valid until the keyboard layout is changed or the application
* exits. * exits.
* @see @ref keyName(Key) * @see @ref keyName(Key)
* @note Supported since GLFW 3.2.
*/ */
static Containers::StringView keyName(Key key); static Containers::StringView keyName(Key key);
#endif
/** @copydoc Sdl2Application::KeyEvent::key() */ /** @copydoc Sdl2Application::KeyEvent::key() */
Key key() const { return _key; } Key key() const { return _key; }
#if defined(DOXYGEN_GENERATING_OUTPUT) || GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
/** /**
* @brief Key name * @brief Key name
* *
@ -2128,10 +2102,8 @@ class GlfwApplication::KeyEvent: public GlfwApplication::InputEvent {
* is valid until the keyboard layout is changed or the application * is valid until the keyboard layout is changed or the application
* exits. * exits.
* @see @ref keyName(Key) * @see @ref keyName(Key)
* @note Supported since GLFW 3.2.
*/ */
Containers::StringView keyName() const; Containers::StringView keyName() const;
#endif
/** @brief Modifiers */ /** @brief Modifiers */
Modifiers modifiers() const { return _modifiers; } Modifiers modifiers() const { return _modifiers; }

24
src/Magnum/Platform/Test/GlfwApplicationTest.cpp

@ -299,11 +299,7 @@ struct GlfwApplicationTest: Platform::Application {
} }
void keyPressEvent(KeyEvent& event) override { void keyPressEvent(KeyEvent& event) override {
Debug{} << "key press:" << event.key() << int(event.key()) Debug{} << "key press:" << event.key() << int(event.key()) << event.keyName() << event.modifiers();
#if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
<< event.keyName()
#endif
<< event.modifiers();
if(event.key() == KeyEvent::Key::F1) { if(event.key() == KeyEvent::Key::F1) {
Debug{} << "starting text input"; Debug{} << "starting text input";
@ -325,14 +321,10 @@ struct GlfwApplicationTest: Platform::Application {
} else if(event.key() == KeyEvent::Key::S) { } else if(event.key() == KeyEvent::Key::S) {
Debug{} << "setting window size, which should trigger a viewport event"; Debug{} << "setting window size, which should trigger a viewport event";
setWindowSize(Vector2i{300, 200}); setWindowSize(Vector2i{300, 200});
} } else if(event.key() == KeyEvent::Key::W) {
#if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
else if(event.key() == KeyEvent::Key::W) {
Debug{} << "setting max window size, which should trigger a viewport event if the size changes"; Debug{} << "setting max window size, which should trigger a viewport event if the size changes";
setMaxWindowSize(Vector2i{700, 500}); setMaxWindowSize(Vector2i{700, 500});
} } else if(event.key() == KeyEvent::Key::H) {
#endif
else if(event.key() == KeyEvent::Key::H) {
Debug{} << "toggling hand cursor"; Debug{} << "toggling hand cursor";
setCursor(cursor() == Cursor::Arrow ? Cursor::Hand : Cursor::Arrow); setCursor(cursor() == Cursor::Arrow ? Cursor::Hand : Cursor::Arrow);
} else if(event.key() == KeyEvent::Key::L) { } else if(event.key() == KeyEvent::Key::L) {
@ -345,11 +337,7 @@ struct GlfwApplicationTest: Platform::Application {
} }
void keyReleaseEvent(KeyEvent& event) override { void keyReleaseEvent(KeyEvent& event) override {
Debug{} << "key release:" << event.key() << int(event.key()) Debug{} << "key release:" << event.key() << int(event.key()) << event.keyName() << event.modifiers();
#if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
<< event.keyName()
#endif
<< event.modifiers();
} }
/* Set to 0 to test the deprecated mouse events instead */ /* Set to 0 to test the deprecated mouse events instead */
@ -453,7 +441,6 @@ GlfwApplicationTest::GlfwApplicationTest(const Arguments& arguments): Platform::
#endif #endif
<< dpiScaling(); << dpiScaling();
#if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
Utility::Resource rs{"icons"}; Utility::Resource rs{"icons"};
PluginManager::Manager<Trade::AbstractImporter> manager; PluginManager::Manager<Trade::AbstractImporter> manager;
Containers::Pointer<Trade::AbstractImporter> importer; Containers::Pointer<Trade::AbstractImporter> importer;
@ -463,9 +450,6 @@ GlfwApplicationTest::GlfwApplicationTest(const Arguments& arguments): Platform::
importer->openData(rs.getRaw("icon-32.tga")) && (image32 = importer->image2D(0)) && importer->openData(rs.getRaw("icon-32.tga")) && (image32 = importer->image2D(0)) &&
importer->openData(rs.getRaw("icon-64.tga")) && (image64 = importer->image2D(0))) setWindowIcon({*image16, *image32, *image64}); importer->openData(rs.getRaw("icon-64.tga")) && (image64 = importer->image2D(0))) setWindowIcon({*image16, *image32, *image64});
else Warning{} << "Can't load the plugin / images, not setting window icon"; else Warning{} << "Can't load the plugin / images, not setting window icon";
#else
Debug{} << "GLFW too old, can't set window icon";
#endif
} }
}}}} }}}}

Loading…
Cancel
Save