mosra / magnum

Lightweight and modular C++11 graphics middleware for games and data visualization
https://magnum.graphics/
Other
4.79k stars 440 forks source link

EmscriptenApplication: powerPreference default is not supported #500

Closed Squareys closed 1 year ago

Squareys commented 3 years ago

Hi all,

in WebGL, there is the option to set powerPreference to prefer high performance or low power consumption, or default. The final value is currently not supported in EmscriptenApplication, but is supported in emscripten.

There might be usecases where letting the User Agent (Browser) choose the power preference is wanted.

Best, Jonathan

mosra commented 3 years ago

Ah I thought this was a PR already :)

I'd say having flags Flag::PowerPreferenceLowPower and Flag::PowerPreferenceHighPerformance would make sense, and the default would be if neither is chosen. And keeping the old one, annotated as deprecated, for backwards compatibility.

mosra commented 1 year ago

Implemented in e9c44739f2a89b49816b4cae5334705a01c6e15e.