Olivier Guyot
2f3e8d04f1
Webgl points / fix hit detection for retina devices
2019-07-11 00:05:55 +02:00
Olivier Guyot
28b99767f8
Webgl points / read only one pixel for feature hit detection
...
Also implements `hasFeatureAtCoordinate`.
`hitTolerance` is not supported for now.
2019-06-28 09:12:20 +02:00
Olivier Guyot
e852294938
Webgl / improve reading of render targets data
...
Now two methods are available: `readAll` and `readPixel`,
and the data from the render target is not re-read every time unless
`clearCachedData` is called.
2019-06-28 09:12:20 +02:00
Olivier Guyot
38920867fb
Webgl Helper / Add a method to prepare drawing to render targets
2019-06-28 09:12:20 +02:00
Olivier Guyot
6224d749c4
WebGL / Introduced the WebGLRenderTarget class
...
This utility class simplifies rendering to a texture & reading the
results of the render.
It also allows clearing its content before a new render.
2019-06-28 09:12:20 +02:00
Olivier Guyot
f25a16d90c
Webgl helper / rework create texture utils
...
Now only one util is available: `createTexture`, which
is tested and allows binding an image and reusing an existing texture.
2019-06-28 09:12:20 +02:00
Olivier Guyot
b6425187de
Remove unused WebGLShader class
2019-06-28 09:06:16 +02:00
Frederic Junod
ef10834eb3
Remove unused constants from ol/webgl
...
And change the `EXTENSIONS` constant to a function
2019-06-20 10:25:22 +02:00
Olivier Guyot
9ae7256048
Merge pull request #9562 from jahow/webgl-worker
...
Optimize the WebGL points renderer using a worker
2019-06-06 08:48:29 +02:00
Olivier Guyot
2412fe0211
Webgl / remove handling of element_index_uint extension
...
From now on we will assume this extension is always enabled.
An error message have been added in the unlikely scenario of a lack
of support.
2019-06-05 14:46:15 +02:00
Frederic Junod
02ce2f4bec
Use compose function from ol/transform
2019-06-04 13:23:12 +02:00
Frederic Junod
06be00bbd5
Webgl Helper / add an API for OESElementIndexUint extension
2019-06-01 15:35:27 +02:00
Olivier Guyot
a366803cdd
Webgl / use the new buffer API in helper & the points renderer
2019-06-01 15:33:36 +02:00
Olivier Guyot
33d007ce01
Webgl buffer / now stores data in typed arrays
...
The `WebGLBuffer` class API was changed in order to allow populating
the internal array in different ways.
2019-06-01 15:33:31 +02:00
Tim Schaub
deb00f20fe
Include full filename in import specifier
2019-05-29 08:51:10 -06:00
Olivier Guyot
5d2b7fe4bb
Webgl points / use the helper ton compute the projection transform
...
The `WebGLHelper` class now provides a `makeProjectionTransform` method
that updates a transform to match the projection for a given frame state.
This also means that the WebGLHelper does not set the projection matrix
uniform anymore, this is the responsibility of the renderer as
the rendered coordinates will not be in world space from now on.
2019-05-15 10:18:47 +02:00
Olivier Guyot
3e2e45ce6d
Webgl helper / add the possibility to use transforms as custom uniforms
...
These will be translated into 4x4 matrices in GLSL.
2019-05-15 10:18:47 +02:00
Olivier Guyot
f69c37566e
Improve documentation on webgl and View
2019-05-04 17:26:05 +02:00
Tim Schaub
58c4c9ebb8
Remove unnecessary closure and fix uniform type
2019-04-19 14:33:43 -07:00
Olivier Guyot
c6a859d1ed
Webgl / clarify premultiplied alpha handling
...
By default, alpha premultiplying should be done by the initial rendering
(eg quads) and not the final post processing pass.
The default post processing pass expects premultiplied color values and
will not do this operation itself.
2019-04-02 22:12:47 +02:00
Olivier Guyot
b955579a9c
Webgl / clarified the buffer binding/flushing logic
...
The Webgl points layer renderer has also been optimized accordingly,
giving out much better performance.
2019-04-02 21:05:31 +02:00
Tim Schaub
511e580c76
Merge pull request #9090 from jahow/add-webgl-points-example
...
Add texture & color to the WebGL points renderer
2018-12-29 22:12:12 -07:00
Olivier Guyot
33c717e159
Use a cleaner way to create a webgl context
2018-12-28 16:10:38 +01:00
Olivier Guyot
62c7a49943
Webgl points / added a texture option & improved doc
2018-12-28 15:53:07 +01:00
Olivier Guyot
0acfd7ab59
WebGL points / Added a color attribute
2018-12-28 15:53:07 +01:00
Olivier Guyot
27b0cf18e7
Update default shaders in documentation of webgl classes
2018-12-07 09:32:52 +01:00
Olivier Guyot
b532a489d4
Webgl points / fix weird glitches by premultiplying alpha
2018-12-07 09:02:02 +01:00
Olivier Guyot
f177a2bcd5
Simple handling of layer opacity in webgl points layer
...
Now the layer opacity is simply handled by a CSS property on the layer DOM element. As such it does not have to be
taken into account in shaders.
2018-12-07 09:02:02 +01:00
Olivier Guyot
2367fbb1ea
Webgl / do not enable missing attributes
...
Some expected attributes might not end up in the compiled shader. In this case, skip calling enableVertexAttrib
2018-12-07 08:57:03 +01:00
jahow
55c36b5aab
Shader compilation errors are now logged even when the compilation succeeded
2018-12-01 00:03:05 +01:00
jahow
6b82cf0b84
Simplified the API of WebGLHelper
...
Now the shader and program caches are simply arrays of native WebGL created objects.
The WebGLHelper simply takes the sources of the frag and vert shader and produces a program.
This removes 2 classes & reduces the general verbosity of the API.
Also a `getShaderCompilationErrors` was added on `WebGLHelper` to help debug GLSL errors.
2018-11-19 13:11:23 +01:00
Frederic Junod
42a8c7983f
Fix webgl types in ol/webgl/PostProcessingPass
2018-11-17 11:20:11 +01:00
Olivier Guyot
66a74ac019
Renamed WebGLBuffer to WebGLArrayBuffer to avoid conflicts
...
In the future this should be reworked to have a clearer API in general.
2018-11-16 14:02:10 +01:00
Olivier Guyot
a84559d1fb
Added documentation & fixed linting for WebGL classes
2018-11-16 14:02:10 +01:00
Olivier Guyot
cb77e10179
Removed the legacy shader build system
2018-11-16 14:02:10 +01:00
Olivier Guyot
530bcd0c88
Improve handling of uniforms in webgl helper
2018-11-16 14:02:10 +01:00
Olivier Guyot
94524fb431
Webgl Helper now handles uniforms with framestate as input
2018-11-16 14:02:10 +01:00
Olivier Guyot
716256e8f3
Cleaned up the heatmap layer & use dynamic radius
2018-11-16 14:02:10 +01:00
Olivier Guyot
fb8bf785dd
Use the gradient texture in the heatmap layer
2018-11-16 14:02:10 +01:00
Olivier Guyot
4a275c543a
Use post-processes in the heatmap example
2018-11-16 14:02:10 +01:00
Olivier Guyot
0c1424c5bb
Added the concept of post process passes for webgl
2018-11-16 14:02:10 +01:00
Olivier Guyot
7fa2189fe9
Remove the bulk of the WebGL legacy code.
...
Things left to do:
* redo an icon layer example
* redo a clipping layer example
* update docs where WebGL renderers are mentioned
2018-11-16 14:02:08 +01:00
Olivier Guyot
d3294730f1
Renamed WebGLContext to Helper for clarity
2018-11-16 14:01:21 +01:00
Olivier Guyot
51becf1c2e
Allow custom post processing & improve blending
2018-11-16 14:01:21 +01:00
Olivier Guyot
298af9ca0f
added the concept of frame buffer in webgl context
2018-11-16 14:01:21 +01:00
Olivier Guyot
3c5eac13c9
Handle alpha & custom shaders in renderer
2018-11-16 14:01:21 +01:00
Olivier Guyot
583dfb8e9d
Actually make the renderer work
2018-11-16 14:01:20 +01:00
Olivier Guyot
1c11dc5311
Improved shader compilation & fixed PointsLayer ones
2018-11-16 14:01:20 +01:00
Olivier Guyot
97b16be572
Added attribute handling
2018-11-16 14:01:20 +01:00
Olivier Guyot
fc20dc986c
Better handle uniform locations in shaders
2018-11-16 14:01:20 +01:00