Commit Graph

31372 Commits

Author SHA1 Message Date
Olivier Guyot
52279967c4 WebGL / Reorganize VectorLayerRenderer options, update example
Now different attributes can be provided for each type of geometry.

Also updated the example to accomodate for this and use the default shaders.
2022-07-15 22:33:52 +02:00
Olivier Guyot
79c974d63d WebGL / Add new module with default shaders for VectorLayer 2022-07-15 22:33:52 +02:00
Olivier Guyot
6848df97f8 WebGL / Address review comments 2022-07-15 22:33:52 +02:00
Olivier Guyot
f603ce7456 WebGL / Support DPR > 1 in linestring shader
A u_pixelRatio uniform was added to be used in the shaders. this is necessary
since we're relying on the builtin gl_FragCoord vector, which will be scaled
relative to the u_sizePx uniform in case of a device pixel ratio != 1.

Also added tests for computed uniform values, instead of just testing
that they were indeed set.
2022-07-15 22:33:52 +02:00
Olivier Guyot
9e35acaa0a Adapt the batch renderers to trigger a repaint after buffer rebuild 2022-07-15 22:33:52 +02:00
burleight
8769ea519e WebGL / render multiple worlds to wrap X in vector renderer
From https://github.com/jahow/openlayers/pull/1

Adds logic in WebGLVectorLayerRenderer to handle multiple worlds visible at once.

Co-authored-by: Tomas Burleigh <t.burleigh@gmail.com>
Co-authored-by: Olivier Guyot <olivier.guyot@camptocamp.com>
2022-07-15 22:33:52 +02:00
Olivier Guyot
7d2b1a9f48 Make the newWebGL vector example experimental
And do not mention hit detection for now
2022-07-15 22:33:52 +02:00
Olivier Guyot
c9f3665237 Remove @api on webgl vector layer renderer as well as utilities
This removes the WebGL vector layer renderer as well as the WebGL helper class
from the API.
2022-07-15 22:33:52 +02:00
Olivier Guyot
7e9c620914 Fix linting and typechecking errors 2022-07-15 22:33:52 +02:00
Olivier Guyot
a2ba7ecaa7 Make some adaptations to the PointsLayer renderer to make it work 2022-07-15 22:33:52 +02:00
Olivier Guyot
979dfd3a55 Add an example for the new webgl vector layer
This example accomodates for hit detection whih is not functional yet.
2022-07-15 22:33:52 +02:00
Olivier Guyot
c555315014 Add a new WebGLVectorLayer renderer
This relies on a mixed geometry batch and separate batch renderers (lines,
points and polygons). A different shader program is used for each of these
geometries, and three rendering passes are made.
2022-07-15 22:33:52 +02:00
Olivier Guyot
cfaf9a14e5 Rework a bit the webgl helper to allow having several programs
Without this, doing render passes with different programs using one
helper instance was not really doable
2022-07-15 22:33:52 +02:00
Olivier Guyot
7892c31715 Adapt the WebGL worker to use the new buffer generation utils 2022-07-15 22:33:52 +02:00
Olivier Guyot
143c19ca03 Add utils for generating webgl buffers from lines and polygons
Uses @mapbox/earcut for polygon (what else), and a home made logic for lines
2022-07-15 22:33:52 +02:00
Olivier Guyot
a18ffaed54 Move webgl utils out of ol/renderer/webgl/Layer module into their own module 2022-07-15 22:33:52 +02:00
Olivier Guyot
eb0db9e3df Introduce batch renderers for each type of geometry
Batch renderers are responsible for generating render instructions and
interacting with the worker to obtain the final webgl buffers
2022-07-15 22:33:52 +02:00
Olivier Guyot
b5fbed5437 Introduce MixedGeometryBatch for webgl rendering
This class keeps an up-to-date list of line, polygon and point geometries
to render as well as vertices counts, geometries count, rings count etc.
2022-07-15 22:33:52 +02:00
Andreas Hocevar
aff4451fb1 Merge pull request #13823 from ahocevar/reduce-canvas-footprint
Reduce canvas memory footprint for better iOS stability
2022-07-15 20:35:09 +02:00
Andreas Hocevar
a02d6786cc Merge pull request #12696 from ahocevar/source-state-union-type
Use union types instead of enums
2022-07-15 20:32:54 +02:00
Andreas Hocevar
96e2400c46 Fix alignment of rotated image layers 2022-07-15 20:30:38 +02:00
Andreas Hocevar
f720404559 Updates after rebase 2022-07-15 11:01:30 +02:00
Andreas Hocevar
884c0c6129 Resolve conflicts 2022-07-15 10:51:08 +02:00
Frederic Junod
252671108f Use union type instead of WMTS request encoding 2022-07-15 10:51:08 +02:00
Frederic Junod
9c1b55e09c Use union type instead of enum for extent corner 2022-07-15 10:51:08 +02:00
Tim Schaub
3a061ed576 Use union type instead of enum for canvas builder type 2022-07-15 10:51:07 +02:00
Tim Schaub
05f9b35eeb Use union type instead of enum for WMS server type 2022-07-15 10:48:38 +02:00
Tim Schaub
d05204f50b Use union type instead of enum for feature format 2022-07-15 10:48:37 +02:00
Tim Schaub
03dbe1f9a1 Use union type instead of enum for overlay positioning 2022-07-15 10:48:37 +02:00
Tim Schaub
9a6f8493fb Use union instead of enum for geometry type 2022-07-15 10:48:37 +02:00
Tim Schaub
04ad0e0c5a Additional uses of new source state type 2022-07-15 10:46:44 +02:00
Andreas Hocevar
57f147988d Use union type for source state 2022-07-15 10:46:44 +02:00
Andreas Hocevar
492458a141 Merge pull request #13824 from openlayers/dependabot/npm_and_yarn/puppeteer-15.3.2
Bump puppeteer from 15.3.0 to 15.3.2
2022-07-11 15:03:28 +02:00
Andreas Hocevar
8b978ef4fe Merge pull request #13825 from openlayers/dependabot/npm_and_yarn/rollup-2.76.0
Bump rollup from 2.75.7 to 2.76.0
2022-07-11 15:02:35 +02:00
dependabot[bot]
bc5ba9c252 Bump rollup from 2.75.7 to 2.76.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.75.7 to 2.76.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.75.7...v2.76.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 10:01:35 +00:00
dependabot[bot]
f2bf5ad5fa Bump puppeteer from 15.3.0 to 15.3.2
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 15.3.0 to 15.3.2.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/v15.3.0...v15.3.2)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 10:01:20 +00:00
Andreas Hocevar
720ccbcd42 Use canvas pool for reprojection tiles 2022-07-10 23:06:41 +02:00
Andreas Hocevar
f3a05ba82d Use device instead of data pixel ratio to determine canvas size 2022-07-10 23:06:41 +02:00
Andreas Hocevar
6086459cba Handle opacity on canvas instead of dom 2022-07-10 23:06:40 +02:00
Andreas Hocevar
239487e9f0 Only create and load tiles within the viewport 2022-07-10 23:06:40 +02:00
Andreas Hocevar
6ffbfa1a4a Minimize canvas size for rotated views 2022-07-10 19:17:51 +02:00
Andreas Hocevar
22dba410ad Release canvas memory when no longer needed 2022-07-10 19:17:50 +02:00
Andreas Hocevar
60f09fcc45 Merge pull request #13817 from jipexu/main
remove XYZ-ESRI -4326-512 example
2022-07-07 18:23:10 +02:00
Andreas Hocevar
e65d09b15b Merge pull request #13819 from mike-000/HERE
Remove HERE Maps example
2022-07-07 18:21:34 +02:00
mike-000
4b54efdd4c Remove example 2022-07-07 15:51:34 +01:00
jipexu
b5bdacaa6a Delete xyz-esri-4326-512.js
#13782
2022-07-07 13:28:43 +02:00
jipexu
a2722ce663 Delete xyz-esri-4326-512.html
#13782
2022-07-07 13:27:52 +02:00
MoonE
65704f0443 Merge pull request #13787 from jipexu/checkcontenteditable
Checkcontenteditable
2022-07-07 01:44:37 +02:00
Maximilian Krög
c2d609c60a Improve targetNotEditable documentation 2022-07-07 01:32:22 +02:00
MoonE
cbd138f967 Merge pull request #13674 from EvertEt/tilegridnull
Add null return type for TileGrid functions
2022-07-07 00:40:45 +02:00