Vladimír Vondruš
bbc6102320
Platform: hide internal {Glfw,Sdl2}Application flags from the header.
...
Because things are going to get messy soon (well, in case of SDL2 they
already are).
6 years ago
Vladimír Vondruš
9d5064c857
Platform: fix Sdl2Application::setSwapInterval(0) + setMinLoopPeriod().
...
It thought VSync was enabled even when it was set to 0. Also clarified
the docs a bit.
6 years ago
Vladimír Vondruš
d64a67ab63
Platform: this error message was beyond useless.
6 years ago
Vladimír Vondruš
32eb99890e
Platform: silence clang-cl warnings from internal SDL headers.
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
Vladimír Vondruš
86c7486402
Platform: fix non-deprecated build.
...
Breakage introduced by the recent window icon addition.
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
Vladimír Vondruš
322a57e88c
Platform: properly fire Sdl2Application::viewportEvent() in all cases.
...
The event wasn't fired when the window size got changed through an API
call. Unfortunately after this change the event gets fired any time
I call setMaxWindowSize(), not just when the size changes.
7 years ago
Vladimír Vondruš
c4e3e3c045
Platform: deprecate Sdl2Application::setMouseLocked().
...
Now also handled by the new setCursor() APIs.
7 years ago
Vladimír Vondruš
04827d3743
Platform: Emscripten support for cursors in Sdl2Application.
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š
35bf229ed5
Platform: add Sdl2Application::Configuration::WindowFlag::{OpenGL,Vulkan}.
7 years ago
Vladimír Vondruš
82f53862e1
Platform: Sdl2Application::mainLoopIteration() now returns a bool.
...
To indicate when the app desires to exit.
7 years ago
Vladimír Vondruš
6ba9bf529a
Platform: doc++
7 years ago
Vladimír Vondruš
64ad4a566a
Platform: fix Sdl2Application on Emscripten with TARGET_GL disabled.
...
An old TODO.
7 years ago
Vladimír Vondruš
a61e258d88
Platform: fix {Sdl2,Glfw}Application startup on GL-less builds.
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š
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š
39678dac09
Platforms: update Emscripten markup for 1.38.27 and up.
...
This took me a while -- the old behavior for all emscripten_*()
functions was to take a DOM element ID as an argument, with nullptr
acting as a "the element that makes most sense for given operation". The
new behavior when -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 is
enabled is to take a CSS selector instead. Presence of this option is
not detectable at compile time, so there was no easy way of knowing
what's the expected value, whether `"module"` or `"#module"`.
After a few failed attempts, I discoverd that using `"#canvas"` would
work for both the old and the new version -- in the new version it would
be selecting an element with id="canvas", while in the old version it
was a special value denoting Module['canvas']. Problem was, however,
that the markup was historically using id="module" and not id="canvas",
so this had to be changed.
This is a breaking change affecting everyone who targets Emscripten. You
need to update the HTML markup and, in case you maintain copies or forks
of the CSS and JS files, these as well. Details in the changelog.
7 years ago
Vladimír Vondruš
80f37d5262
Platforms: Pointer_stringify() is no more.
7 years ago
Vladimír Vondruš
9005b3c9aa
Platform: expose also window events via Sdl2Application::anyEvent().
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
Vladimír Vondruš
d7d65db884
Platform: hint SDL what GLES library we want to use.
7 years ago
Vladimír Vondruš
20a55b16aa
Platform: implement Sdl2Application::anyEvent(), expose SDL_Event.
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š
40c0576918
Platform: set SDL hints before SDL_Init().
...
Some of them need that.
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.
8 years ago
Vladimír Vondruš
b73b9cb408
Platform: remove 50 000 lines from Sdl2Application header.
...
Of all the libraries I use, I expected SDL to do the "include the world"
horror the least of all. Ugh.
8 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š
3828e6b9a3
Platform: don't disable compositing in Sdl2App.
...
Yay, it was fixed in the meantime!
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š
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
Vladimír Vondruš
47ade4ef53
Platform: make it possible to get scroll position in Glfw and Sdl2App.
8 years ago
Vladimír Vondruš
9095954e6d
Platform: added Sdl2Application::setContainerCssClass().
8 years ago
Vladimír Vondruš
c657da8017
Platform: use our own APIs to get framebuffer size.
8 years ago
Vladimír Vondruš
934d9e6bf9
Platform: resize events in Sdl2App on Emscripten, autodetecting size.
...
I thought this would "just work", BUT NO. The only way is to poll for
canvas size once a frame, apparently.
8 years ago
Vladimír Vondruš
56a933b17c
Platform: deprecate Sdl2Application AllowHighDpi window flag.
...
It's now passed implicitly on platforms that need it.
8 years ago