Commit Graph

772 Commits

Author SHA1 Message Date
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 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 a18ffaed54 Move webgl utils out of ol/renderer/webgl/Layer module into their own module 2022-07-15 22:33:52 +02:00
Andreas Hocevar f720404559 Updates after rebase 2022-07-15 11:01:30 +02:00
Tim Schaub 9a6f8493fb Use union instead of enum for geometry type 2022-07-15 10:48:37 +02:00
Andreas Hocevar 57f147988d Use union type for source state 2022-07-15 10:46:44 +02:00
mike-000 214a384adf Fix tile pyramid getData() 2022-05-28 11:56:24 +01:00
Tim Schaub 38b48bd341 Explicit data tile size 2022-05-06 14:47:10 -06:00
Tim Schaub de9f6e2dc5 Handle rotation with non-square tiles 2022-04-25 10:40:37 -06:00
Andreas Hocevar d315675ecc Merge pull request #13528 from burleight/webglpointslayer-wrap-x
WebGLPointsLayer wrapX support - partially addressing #11131
2022-04-17 17:34:01 +02:00
mike-000 36159287d5 handle gutter in renderer 2022-04-08 14:17:22 +01:00
Tomas Burleigh d524d46969 WebGLPointsLayer wrapX support - partially addressing #11131
WebGLPointsLayer renderFrame and renderHitDetection will now draw
multiple worlds if the source and projection support wrapX.

Hit detection needs additional improvement. It stops working after
more than one wrap around the world. If 0 is the middle world, then
the hit detection works for worlds -1, 0, and -1, but not for worlds
> 2 or < -2.

The example has hit detection enabled, demonstrated with a colour
change on hover for the circle styles. When moving the mouse, the hit
detection is unreliable and flickers on/off. This needs improvement.

The webgl-points renderer test has been updated.
2022-04-01 13:35:13 +13:00
Maximilian Krög b29ab8f104 Link to class instead of module pages 2022-02-14 21:53:07 +01:00
Tim Schaub 6f005e1f30 Preload tiles for WebGL tile layers 2022-02-09 14:01:14 -07:00
Tim Schaub eb4d5e0784 Get pixel data 2022-02-07 18:35:47 -07:00
MoonE cd45663996 Merge pull request #13336 from MoonE/dispose-webgl
Dispose of webgl contexts
2022-02-07 22:38:36 +01:00
Tim Schaub d9a11195e0 Merge pull request #13269 from mike-000/TileTexture-tilePixelRatio-gutter
Pass tilePixelRatio and gutter to TileTexture
2022-02-07 13:45:22 -07:00
Maximilian Krög a86f0704f3 Fix error when disposing ol/renderer/webgl/TileLayer
- helper may not exist
- tileTextureCache not cleared when canvasCacheKey changes
2022-02-07 00:17:32 +01:00
Tim Schaub adbbc05159 Avoid rendering outside WebGL layer and source extent 2022-02-05 21:02:22 -07:00
Tim Schaub f10ba5c1e3 Avoid duplicate imports 2022-02-05 11:46:26 -07:00
Maximilian Krög 93c08784af Only set renderer to ready when all messages are received 2022-02-02 22:54:16 +01:00
Andreas Hocevar 7c3c1ac354 Fix rendercomplete for WebGLPoints layer and subclasses 2022-02-01 17:13:37 +01:00
Andreas Hocevar c92e1ec9ab Improve types for tile layers 2022-01-30 09:10:29 +01:00
Andreas Hocevar 94cc414ea2 Defaults for the Layer, Source and Feature generics 2022-01-26 22:40:27 +01:00
mike-000 7af366586f Pass tilePixelRatio and gutter to TileTexture 2022-01-20 17:50:49 +00:00
Andreas Hocevar 0004b2594d Support multiple sources for layers 2022-01-13 17:42:52 +01:00
Tim Schaub 647a0d8ece Support the wrapX option for WebGL rendered tile sources 2022-01-11 12:48:49 -07:00
mike-000 766a336650 Add getDataAtPixel() method for WebGL 2022-01-03 13:00:56 +00:00
Tim Schaub 2d510e71a9 Ensure that tile range covers all pixels 2021-12-23 17:50:49 -07:00
Tim Schaub 59186f2afd Support paletted rendering in WebGL 2021-12-22 11:14:46 -07:00
mike-000 351ca5866b update docs to include u_opacity 2021-12-22 10:48:25 +00:00
Tim Schaub 68ea485e69 Dispatch precompose and postcompose events for WebGL layers 2021-12-15 16:59:51 -07:00
Tim Schaub f5803ad6ca Support expressions for band arguments 2021-12-05 17:04:50 -07:00
Tim Schaub c2fc800fc1 Allow WebGL tile layer style to be updated 2021-12-02 16:32:00 -07:00
Tim Schaub 3bf1aef8e2 Avoid loading tiles outside the grid extent 2021-11-30 16:30:51 -07:00
Tim Schaub f336cf30b0 Additional types for WebGL renderer, sources, and tiles 2021-11-16 11:24:41 -07:00
Tim Schaub 71020bb5e4 Merge pull request #12976 from mike-000/WebGL-ReprojTile
Handle ReprojTile in ol/layer/WebGLTile
2021-11-16 09:40:00 -07:00
Tim Schaub a2f3c02ac5 Allow canvas reuse for WebGL layers 2021-11-14 12:34:14 -07:00
Tim Schaub 0dfbedb099 Lazily create the WebGL helper 2021-11-13 11:37:09 -07:00
mike-000 4a80ebe1fc expire cache for tileGrid projection 2021-11-08 12:39:18 +00:00
Tim Schaub 2adf74ece4 Include WebGL context in render events for WebGL layers 2021-10-29 08:39:47 -06:00
Tim Schaub 4dc66ef8e3 Enqueue tiles at the next resolution in the animation 2021-09-23 17:28:39 +00:00
Tim Schaub a332842540 More cleanup in the WebGL tile layer's dispose method 2021-09-23 12:00:00 +00:00
Duck 17394cc8be Ensure the texture is loaded into the correct index.
The previous code would try to load subsequent textures into the 0th slot.
2021-09-15 15:10:08 -07:00
Tim Schaub d37e3e3134 Configure cache on the layer instead of the source 2021-08-27 18:04:00 -06:00
Andreas Hocevar 7acd5338c9 Allow sampling data from neighboring pixels 2021-08-18 11:24:37 +02:00
Andreas Hocevar 4526f2ef34 Properly handle alt tiles of transparent images 2021-08-18 11:24:34 +02:00