Marco Melorio
1b1c12a56f
GlfwApplication: added new GLFW 3.4 resizing cursors.
6 years ago
Vladimír Vondruš
e67526abf0
Platform: ability to set window size in Sdl2 and GlfwApplication.
...
It had the min/max size setters added in 2019.10 but this was missing.
6 years ago
Konstantinos Chatzilygeroudis
5e5c5f7945
GlfwApplication: fix for empty env XDG_SESSION_TYPE
7 years ago
Vladimír Vondruš
090c6bb4a7
Platform: window icon management in Glfw and Sdl2Application.
7 years ago
Vladimír Vondruš
51e65aaae0
Platform: respect DPI in setMin/MaxWindowSize().
...
I hope this doesn't break someone's use case.
7 years ago
Konstantinos Chatzilygeroudis
c8d2c33ac6
Fix for Glfw and Wayland crashing when showing the window after being hidden
7 years ago
Konstantinos Chatzilygeroudis
411e349358
GlfwApplication: Workaround for DPI scaling when monitor size is equal to zero
7 years ago
Konstantinos Chatzilygeroudis
756c1242ad
GlfwApplication: add mainLoopIteration similar to Sdl2Application
7 years ago
Vladimír Vondruš
8d9d247573
Platform: deprecate badly designed & useless GlfwApp setCursorMode().
...
I'm not sure who thought making this settable only during app startup
(and never after) is a good idea. Let's use the new setCursor() APIs
instead.
7 years ago
Vladimír Vondruš
a1bca4d8f4
Platform: minor cleanup, doc++, make cursor LUTs file-local.
7 years ago
Marco Melorio
40bfa7ae91
Plaftorm: Add cursor management support
7 years ago
Vladimír Vondruš
305454453d
Platform: fix GLFW context creation on GL-less builds.
7 years ago
Vladimír Vondruš
a61e258d88
Platform: fix {Sdl2,Glfw}Application startup on GL-less builds.
7 years ago
Vladimír Vondruš
89d4a754d5
Platform: add MouseMoveEvent::relativePosition() to Glfw and Emscripten.
...
These toolkits don't support it, but I got really annoyed and so the
apps are emulating it.
7 years ago
Vladimír Vondruš
ad22f463fb
Platform: add {Sdl2,Glfw,Emscripten}Application::setWindowTitle().
...
On Emscripten as well, however I'm keeping the Configuration::setTitle()
a no-op because the title is usually set by the HTML markup already and
so dynamic code implicitly changing it to something else doesn't make
much sense.
7 years ago
Vladimír Vondruš
df6582d948
Platform: ask for debug context if --magnum-gpu-validation is enabled.
...
Also mention the option more prominently in related docs.
7 years ago
Vladimír Vondruš
50902e72d7
Platform: check for non-null GL_VENDOR before comparing it.
...
Otherwise, when context creation fails *really bad*, this crashes
somewhere deep in __strncmp_sse42 or so.
7 years ago
Vladimír Vondruš
f383959fb0
Platform: fix SDL2/GLFW viewportEvent() on Retina-aware {i,mac}OS apps.
7 years ago
Guillaume Jacquemin
b4dac78ef3
Platform: improve {Glfw,Sdl2}Application.
...
Two new methods, setMinWindowSize() and setMaxWindowSize(), were added.
They use the underlying library's API to achieve their purpose.
7 years ago
Guillaume Jacquemin
f4b6130ab0
Platform: improve {Glfw,Sdl2}Application::exit().
...
Now, it's possible to specify a custom exit code.
7 years ago
Vladimír Vondruš
64bc7f9c8e
Math: moved configuration value parsers to a dedicated header.
...
There's a lot of string operations and that's nothing good to have
included everywhere. Should speed up the compilation quite a bit.
7 years ago
Vladimír Vondruš
930a323c05
GL: removed deprecated aliases to GL functionality in the root namespace.
...
Deprecated for 2018.04, it's been almost a year since. Whoever is using
Magnum regularly updated already, and who not can always upgrade
gradually (2018.02, 2018.04, 2018.10, 2019.01 etc.).
7 years ago
Vladimír Vondruš
b168433c4e
Platform: minor cleanup.
7 years ago
Vladimír Vondruš
2253987531
Platform: HiDPI support for SDL2 and GLFW on Windows.
...
Co-authored-by: Guillaume Jacquemin <williamjcm@users.noreply.github.com>
7 years ago
Vladimír Vondruš
d98efb241d
Platform: deduplicate DPI handling code.
...
And compilation of it. It should be enough to have just an OBJECT
library added to each, instead of including a header which includes the
world.
7 years ago
Vladimír Vondruš
053f406b7d
Platform: make SDL2 and GLFW apps buildable without TARGET_GL again.
...
I'm pretty sure this worked correctly in 2018.04.
7 years ago
Thibault Jochem
28e300da02
zero-initialize utf8 buffer.
7 years ago
Vladimír Vondruš
e6b7aa12fa
Updated copyright year.
7 years ago
Vladimír Vondruš
3ca13dbc1b
Platform: implement {Glfw,Sdl2}Application::exitEvent().
...
SDL has to be special and behave weirdly, of course, as always.
7 years ago
Vladimír Vondruš
877557fff0
Platform: minor event cleanup in GlfwApplication.
7 years ago
Vladimír Vondruš
1e0d3d3727
Platform: proper feature parity for GlfwApplication::ViewportEvent.
...
Not sure why I omitted this in dba35bac7a .
7 years ago
Vladimír Vondruš
8f55880b6b
Platform: remove deprecated wheel-reported-as-button events.
...
Deprecated in 2a77856df2 (June 2016). Use
the dedicated mouseScrollEvent() API instead.
7 years ago
Vladimír Vondruš
c579060922
Platform: ability to override GL forward compatibility in SDL and GLFW.
...
It's enabled by default, but it's possible to explicitly remove the flag
to allow for using features that are not enabled otherwise (such as wide
lines). To make the flag handling easier, there's now also new
addFlags() and clearFlags() methods.
8 years ago
Vladimír Vondruš
e1e4dbd4c4
Platform: properly fall back to physical DPI scaling.
...
Not sure why I did it this way. For sure wasn't like that in the initial
implementation.
8 years ago
Vladimír Vondruš
5319e6bb1c
Platform: properly initialize a value.
8 years ago
Vladimír Vondruš
674a740da5
Renamed various sRGB-related GL APIs for consistency with naming in Math.
...
As usual, the old names are deprecated aliases to the new things.
8 years ago
Vladimír Vondruš
dba35bac7a
Platform: initial HiDPI support in GlfwApplication.
...
Not basing this off GLFW 3.3 as it's far from being released yet, just a
copy of what's done for SDL2 already.
8 years ago
Vladimír Vondruš
d21c05f6f3
Platform: disallow calling framebufferSize() / windowSize() w/o a window.
8 years ago
Squareys
f832c8df51
Platform: gracefully fail GlfwApplication::exec() if no window was opened
...
Signed-off-by: Squareys <squareys@googlemail.com>
8 years ago
Vladimír Vondruš
47ade4ef53
Platform: make it possible to get scroll position in Glfw and Sdl2App.
8 years ago
Vladimír Vondruš
ed0a719da2
Platform: pass a class to viewportEvent().
...
With HiDPI support it's no longer just about window size changing -- if
the framebuffer size is different than window size, on resize both are
changed to new (different) values. Other than that, for example, when
moving a window from one display to another with a different DPI,
all three of window size, framebuffer size and DPI scaling can change as
well. This should be all reflected in the event.
This change is done in all Application classes, but the full
implementation is only in the SDL2 implementation at the moment, as the
others don't have full HiDPI support implemented yet. The old
viewportEvent(const Vector2i&) is deprecated and for backwards
compatibility called with either framebufferSize() or windowSize()
(depending on level of HiDPI support) from the new event. Overriding the
old one will still work as expected (in case you build with
MAGNUM_BUILD_DEPRECATED enabled and use the `override` keyword -- which
you should); overriding the new one will cause the compat implementation
to not be called anymore.
In order to make it possible to preserve backwards compatibility, the
viewportEvent() is no longer pure virtual in Screen. That's also
consistent with all Application implementations.
8 years ago
Vladimír Vondruš
25d0bb8768
Platform: {Android,Glfw}Application: consistent windowSize() with SDL.
...
Not providing framebufferSize() or dpiScaling() there yet, as that's a
bit involved in both cases. Support will be added, eventually.
8 years ago
Vladimír Vondruš
24b91e40c2
Platform: ability to specify color/depth/stencil buffer sizes.
8 years ago
Vladimír Vondruš
b48b0c1296
Platform: properly redraw GlfwApplication restored from minimize.
...
Lots of things unfinished here.
8 years ago
Vladimír Vondruš
1b5e6812fb
Platform: setup GlfwApplication callbacks in a central place.
...
Removes all needless private static class members and fixes a bug
introduced when getting rid of the global window pointer -- the user
window pointer was set only in the case of having a GL context, not in
the contextless case. Boom. (This bug happened after 2018.04, so I'm not
putting that in the changelog.)
8 years ago
Vladimír Vondruš
80e682d046
Platform: implemented GlfwApplication::MouseMoveEvent::buttons().
...
Improves feature parity with Sdl2Application.
8 years ago
Vladimír Vondruš
84ab1d7dad
Platform: lazy-load modifiers in GlfwApplication mouse move/scroll event.
...
No need to fetch them every time. Doing it similarly to Sdl2Application.
8 years ago
Vladimír Vondruš
0e2b251e39
Platform: GLFW doesn't allow to create GL 3.1 core contexts.
8 years ago
Vladimír Vondruš
f30ca8929e
Platform: prefer core GL contexts in GlfwApplication as well.
...
Basically copies the behavior over from Sdl2Application.
8 years ago
Vladimír Vondruš
3e025f6d5b
Platform: no need to store a global window instance pointer.
...
And it was foolish of me to ever attempt to think that GLFW has
the same limitation as GLUT in this regard. Sorry.
8 years ago