-
-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add contextAttributes map option #5196
Conversation
I'm working on enabling setting which WebGL version do you want to use but since that requires some changes on how shaders are compiled, I'm working on a branch on top of this to keep changes separated |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5196 +/- ##
=======================================
Coverage 91.82% 91.82%
=======================================
Files 281 281
Lines 38776 38777 +1
Branches 6758 6758
=======================================
+ Hits 35605 35606 +1
Misses 3044 3044
Partials 127 127 ☔ View full report in Codecov by Sentry. |
I've added a few comments. |
45e2d2f
to
f5e6176
Compare
f5e6176
to
a886440
Compare
This PR fixes #5135 by adding a
contextAttributes
property to the map constructor that supports all WebGLContextAttributes, so now you can do something like:Note that some
WebGLContextAttributes
can't be overwritten because Maplibre relies on it. These arealpha
,depth
,stencil
andpremultipliedAlpha
which are always set totrue
.This PR also sets the default WebGL
powerPreference
tohigh-performance
instead ofdefault
, which defaults to using dedicated GPUs on multi-GPU systems.Launch Checklist
CHANGELOG.md
under the## main
section.