Module: ol/renderer/webgl/Layer

ol/renderer/webgl/Layer


Classes

WebGLLayerRenderer

Members

module:ol/renderer/webgl/Layer.WebGLWorkerMessageType{string}

Type Definitions

BufferPositions{Object}

An object holding positions both in an index and a vertex buffer.

Properties:
Name Type Description
vertexPosition number

Position in the vertex buffer

indexPosition number

Position in the index buffer

Options{Object}

Properties:
Name Type Argument Description
uniforms Object.<string, module:ol/webgl/Helper~UniformValue> <optional>

Uniform definitions for the post process steps

postProcesses Array.<module:ol/renderer/webgl/Layer~PostProcessesOptions> <optional>

Post-processes definitions

PostProcessesOptions{Object}

Properties:
Name Type Argument Description
scaleRatio number <optional>

Scale ratio; if < 1, the post process will render to a texture smaller than the main canvas that will then be sampled up (useful for saving resource on blur steps).

vertexShader string <optional>

Vertex shader source

fragmentShader string <optional>

Fragment shader source

uniforms Object.<string, module:ol/webgl/Helper~UniformValue> <optional>

Uniform definitions for the post process step

WebGLWorkerGenerateBuffersMessage{Object}

This message will trigger the generation of a vertex and an index buffer based on the given render instructions. When the buffers are generated, the worked will send a message of the same type to the main thread, with the generated buffers in it. Note that any addition properties present in the message will be sent back to the main thread.

Properties:
Name Type Argument Description
type module:ol/renderer/webgl/Layer~WebGLWorkerMessageType

Message type

renderInstructions ArrayBuffer

Render instructions raw binary buffer.

vertexBuffer ArrayBuffer <optional>

Vertices array raw binary buffer (sent by the worker).

indexBuffer ArrayBuffer <optional>

Indices array raw binary buffer (sent by the worker).

customAttributesCount number <optional>

Amount of custom attributes count in the render instructions.