Skip to main content

Class: abstract WebGLLayerProgram<N, E, G>

Defined in: layer-webgl/src/webgl-layer-program/index.ts:24

This program is based on the base Program from Sigma, but instead of using this.array to iterate over the vertices, it is bound to some uniform directly for the fragment shader.

So, when extending this new CustomLayerProgram abstract class:

  • Do not implement getDefinition, implement getCustomLayerDefinition instead
  • Do not implement setUniforms, implement setCameraUniforms and cacheDataUniforms instead

Extends

Type Parameters

N extends Attributes = Attributes

E extends Attributes = Attributes

G extends Attributes = Attributes

Constructors

new WebGLLayerProgram()

new WebGLLayerProgram<N, E, G>(gl, pickingBuffer, renderer): WebGLLayerProgram<N, E, G>

Defined in: layer-webgl/src/webgl-layer-program/index.ts:34

Parameters

gl

WebGLRenderingContext | WebGL2RenderingContext

pickingBuffer

null | WebGLFramebuffer

renderer

Sigma<N, E, G>

Returns

WebGLLayerProgram<N, E, G>

Overrides

Program.constructor

Properties

array

array: Float32Array

Defined in: sigma/src/rendering/program.ts:69

Inherited from

Program.array


ATTRIBUTES

ATTRIBUTES: ProgramAttributeSpecification[]

Defined in: sigma/src/rendering/program.ts:60

Inherited from

Program.ATTRIBUTES


ATTRIBUTES_ITEMS_COUNT

ATTRIBUTES_ITEMS_COUNT: number

Defined in: sigma/src/rendering/program.ts:65

Inherited from

Program.ATTRIBUTES_ITEMS_COUNT


capacity

capacity: number = 0

Defined in: sigma/src/rendering/program.ts:71

Inherited from

Program.capacity


CONSTANT_ATTRIBUTES

CONSTANT_ATTRIBUTES: ProgramAttributeSpecification[]

Defined in: sigma/src/rendering/program.ts:62

Inherited from

Program.CONSTANT_ATTRIBUTES


CONSTANT_DATA

CONSTANT_DATA: number[][]

Defined in: sigma/src/rendering/program.ts:63

Inherited from

Program.CONSTANT_DATA


constantArray

constantArray: Float32Array

Defined in: sigma/src/rendering/program.ts:70

Inherited from

Program.constantArray


FRAGMENT_SHADER_SOURCE

FRAGMENT_SHADER_SOURCE: string

Defined in: sigma/src/rendering/program.ts:58

Inherited from

Program.FRAGMENT_SHADER_SOURCE


isInstanced

isInstanced: boolean

Defined in: sigma/src/rendering/program.ts:77

Inherited from

Program.isInstanced


METHOD

METHOD: number

Defined in: sigma/src/rendering/program.ts:61

Inherited from

Program.METHOD


normalProgram

normalProgram: ProgramInfo

Defined in: sigma/src/rendering/program.ts:74

Inherited from

Program.normalProgram


pickProgram

pickProgram: null | ProgramInfo

Defined in: sigma/src/rendering/program.ts:75

Inherited from

Program.pickProgram


renderer

renderer: Sigma<N, E, G>

Defined in: sigma/src/rendering/program.ts:68

Inherited from

Program.renderer


STRIDE

STRIDE: number

Defined in: sigma/src/rendering/program.ts:66

Inherited from

Program.STRIDE


UNIFORMS

UNIFORMS: readonly string[]

Defined in: sigma/src/rendering/program.ts:59

Inherited from

Program.UNIFORMS


VERTEX_SHADER_SOURCE

VERTEX_SHADER_SOURCE: string

Defined in: sigma/src/rendering/program.ts:57

Inherited from

Program.VERTEX_SHADER_SOURCE


VERTICES

VERTICES: number

Defined in: sigma/src/rendering/program.ts:56

Inherited from

Program.VERTICES


verticesCount

verticesCount: number = 0

Defined in: sigma/src/rendering/program.ts:72

Inherited from

Program.verticesCount

Methods

bindAttribute()

protected bindAttribute(attr, program, offset, setDivisor?): number

Defined in: sigma/src/rendering/program.ts:244

Parameters

attr

ProgramAttributeSpecification

program

ProgramInfo

offset

number

setDivisor?

boolean

Returns

number

Inherited from

Program.bindAttribute


bindProgram()

protected bindProgram(program): void

Defined in: layer-webgl/src/webgl-layer-program/index.ts:62

Parameters

program

ProgramInfo

Returns

void

Overrides

Program.bindProgram


cacheDataUniforms()

abstract cacheDataUniforms(programInfo): void

Defined in: layer-webgl/src/webgl-layer-program/index.ts:30

Parameters

programInfo

ProgramInfo

Returns

void


drawWebGL()

drawWebGL(method, __namedParameters): void

Defined in: sigma/src/rendering/program.ts:355

Parameters

method

number

__namedParameters

ProgramInfo

Returns

void

Inherited from

Program.drawWebGL


getCustomLayerDefinition()

abstract getCustomLayerDefinition(): WebGLLayerDefinition

Defined in: layer-webgl/src/webgl-layer-program/index.ts:32

Returns

WebGLLayerDefinition


getDefinition()

getDefinition(): ProgramDefinition

Defined in: layer-webgl/src/webgl-layer-program/index.ts:44

Returns

ProgramDefinition

Overrides

Program.getDefinition


getProgramInfo()

protected getProgramInfo(name, gl, vertexShaderSource, fragmentShaderSource, frameBuffer): ProgramInfo

Defined in: sigma/src/rendering/program.ts:150

Parameters

name

"normal" | "pick"

gl

WebGLRenderingContext | WebGL2RenderingContext

vertexShaderSource

string

fragmentShaderSource

string

frameBuffer

null | WebGLFramebuffer

Returns

ProgramInfo

Inherited from

Program.getProgramInfo


hasNothingToRender()

hasNothingToRender(): boolean

Defined in: layer-webgl/src/webgl-layer-program/index.ts:56

Returns

boolean

Overrides

Program.hasNothingToRender


kill()

kill(): void

Defined in: sigma/src/rendering/program.ts:141

Returns

void

Inherited from

Program.kill


reallocate()

reallocate(capacity): void

Defined in: sigma/src/rendering/program.ts:297

Parameters

capacity

number

Returns

void

Inherited from

Program.reallocate


render()

render(params): void

Defined in: sigma/src/rendering/program.ts:334

Parameters

params

RenderParams

Returns

void

Inherited from

Program.render


renderProgram()

protected renderProgram(params, programInfo): void

Defined in: sigma/src/rendering/program.ts:318

Parameters

params

RenderParams

programInfo

ProgramInfo

Returns

void

Inherited from

Program.renderProgram


setCameraUniforms()

abstract setCameraUniforms(params, programInfo): void

Defined in: layer-webgl/src/webgl-layer-program/index.ts:31

Parameters

params

RenderParams

programInfo

ProgramInfo

Returns

void


setUniforms()

setUniforms(params, programInfo): void

Defined in: layer-webgl/src/webgl-layer-program/index.ts:59

Parameters

params

RenderParams

programInfo

ProgramInfo

Returns

void

Overrides

Program.setUniforms


unbindAttribute()

protected unbindAttribute(attr, program, unsetDivisor?): void

Defined in: sigma/src/rendering/program.ts:279

Parameters

attr

ProgramAttributeSpecification

program

ProgramInfo

unsetDivisor?

boolean

Returns

void

Inherited from

Program.unbindAttribute


unbindProgram()

protected unbindProgram(program): void

Defined in: sigma/src/rendering/program.ts:235

Parameters

program

ProgramInfo

Returns

void

Inherited from

Program.unbindProgram