Skip to main content

Class: abstract WebGLLayerProgram<N, E, G>

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>

Parameters

gl: WebGLRenderingContext | WebGL2RenderingContext

pickingBuffer: null | WebGLFramebuffer

renderer: Sigma<N, E, G>

Returns

WebGLLayerProgram<N, E, G>

Overrides

Program.constructor

Defined in

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

Properties

array

array: Float32Array

Inherited from

Program.array

Defined in

sigma/src/rendering/program.ts:69


ATTRIBUTES

ATTRIBUTES: ProgramAttributeSpecification[]

Inherited from

Program.ATTRIBUTES

Defined in

sigma/src/rendering/program.ts:60


ATTRIBUTES_ITEMS_COUNT

ATTRIBUTES_ITEMS_COUNT: number

Inherited from

Program.ATTRIBUTES_ITEMS_COUNT

Defined in

sigma/src/rendering/program.ts:65


capacity

capacity: number = 0

Inherited from

Program.capacity

Defined in

sigma/src/rendering/program.ts:71


CONSTANT_ATTRIBUTES

CONSTANT_ATTRIBUTES: ProgramAttributeSpecification[]

Inherited from

Program.CONSTANT_ATTRIBUTES

Defined in

sigma/src/rendering/program.ts:62


CONSTANT_DATA

CONSTANT_DATA: number[][]

Inherited from

Program.CONSTANT_DATA

Defined in

sigma/src/rendering/program.ts:63


constantArray

constantArray: Float32Array

Inherited from

Program.constantArray

Defined in

sigma/src/rendering/program.ts:70


FRAGMENT_SHADER_SOURCE

FRAGMENT_SHADER_SOURCE: string

Inherited from

Program.FRAGMENT_SHADER_SOURCE

Defined in

sigma/src/rendering/program.ts:58


isInstanced

isInstanced: boolean

Inherited from

Program.isInstanced

Defined in

sigma/src/rendering/program.ts:77


METHOD

METHOD: number

Inherited from

Program.METHOD

Defined in

sigma/src/rendering/program.ts:61


normalProgram

normalProgram: ProgramInfo<string>

Inherited from

Program.normalProgram

Defined in

sigma/src/rendering/program.ts:74


pickProgram

pickProgram: null | ProgramInfo<string>

Inherited from

Program.pickProgram

Defined in

sigma/src/rendering/program.ts:75


renderer

renderer: Sigma<N, E, G>

Inherited from

Program.renderer

Defined in

sigma/src/rendering/program.ts:68


STRIDE

STRIDE: number

Inherited from

Program.STRIDE

Defined in

sigma/src/rendering/program.ts:66


UNIFORMS

UNIFORMS: readonly string[]

Inherited from

Program.UNIFORMS

Defined in

sigma/src/rendering/program.ts:59


VERTEX_SHADER_SOURCE

VERTEX_SHADER_SOURCE: string

Inherited from

Program.VERTEX_SHADER_SOURCE

Defined in

sigma/src/rendering/program.ts:57


VERTICES

VERTICES: number

Inherited from

Program.VERTICES

Defined in

sigma/src/rendering/program.ts:56


verticesCount

verticesCount: number = 0

Inherited from

Program.verticesCount

Defined in

sigma/src/rendering/program.ts:72

Methods

bindAttribute()

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

Parameters

attr: ProgramAttributeSpecification

program: ProgramInfo<string>

offset: number

setDivisor?: boolean

Returns

number

Inherited from

Program.bindAttribute

Defined in

sigma/src/rendering/program.ts:244


bindProgram()

protected bindProgram(program): void

Parameters

program: ProgramInfo<string>

Returns

void

Overrides

Program.bindProgram

Defined in

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


cacheDataUniforms()

abstract cacheDataUniforms(programInfo): void

Parameters

programInfo: ProgramInfo<string>

Returns

void

Defined in

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


drawWebGL()

drawWebGL(method, __namedParameters): void

Parameters

method: number

__namedParameters: ProgramInfo<string>

Returns

void

Inherited from

Program.drawWebGL

Defined in

sigma/src/rendering/program.ts:355


getCustomLayerDefinition()

abstract getCustomLayerDefinition(): WebGLLayerDefinition

Returns

WebGLLayerDefinition

Defined in

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


getDefinition()

getDefinition(): ProgramDefinition<string>

Returns

ProgramDefinition<string>

Overrides

Program.getDefinition

Defined in

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


getProgramInfo()

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

Parameters

name: "normal" | "pick"

gl: WebGLRenderingContext | WebGL2RenderingContext

vertexShaderSource: string

fragmentShaderSource: string

frameBuffer: null | WebGLFramebuffer

Returns

ProgramInfo<string>

Inherited from

Program.getProgramInfo

Defined in

sigma/src/rendering/program.ts:150


hasNothingToRender()

hasNothingToRender(): boolean

Returns

boolean

Overrides

Program.hasNothingToRender

Defined in

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


kill()

kill(): void

Returns

void

Inherited from

Program.kill

Defined in

sigma/src/rendering/program.ts:141


reallocate()

reallocate(capacity): void

Parameters

capacity: number

Returns

void

Inherited from

Program.reallocate

Defined in

sigma/src/rendering/program.ts:297


render()

render(params): void

Parameters

params: RenderParams

Returns

void

Inherited from

Program.render

Defined in

sigma/src/rendering/program.ts:334


renderProgram()

protected renderProgram(params, programInfo): void

Parameters

params: RenderParams

programInfo: ProgramInfo<string>

Returns

void

Inherited from

Program.renderProgram

Defined in

sigma/src/rendering/program.ts:318


setCameraUniforms()

abstract setCameraUniforms(params, programInfo): void

Parameters

params: RenderParams

programInfo: ProgramInfo<string>

Returns

void

Defined in

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


setUniforms()

setUniforms(params, programInfo): void

Parameters

params: RenderParams

programInfo: ProgramInfo<string>

Returns

void

Overrides

Program.setUniforms

Defined in

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


unbindAttribute()

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

Parameters

attr: ProgramAttributeSpecification

program: ProgramInfo<string>

unsetDivisor?: boolean

Returns

void

Inherited from

Program.unbindAttribute

Defined in

sigma/src/rendering/program.ts:279


unbindProgram()

protected unbindProgram(program): void

Parameters

program: ProgramInfo<string>

Returns

void

Inherited from

Program.unbindProgram

Defined in

sigma/src/rendering/program.ts:235