Skip to main content

Class: Program<Uniform, N, E, G>

sigma/src/rendering.Program

Type parameters

NameType
Uniformextends string = string
Nextends Attributes = Attributes
Eextends Attributes = Attributes
Gextends Attributes = Attributes

Hierarchy

Implements

Constructors

constructor

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

Type parameters

NameType
Uniformextends string = string
Nextends Attributes = Attributes
Eextends Attributes = Attributes
Gextends Attributes = Attributes

Parameters

NameType
glWebGLRenderingContext | WebGL2RenderingContext
pickingBuffernull | WebGLFramebuffer
rendererSigma<N, E, G>

Returns

Program<Uniform, N, E, G>

Defined in

sigma/src/rendering/program.ts:114

Properties

ATTRIBUTES

ATTRIBUTES: ProgramAttributeSpecification[]

Implementation of

InstancedProgramDefinition.ATTRIBUTES

Defined in

sigma/src/rendering/program.ts:93


ATTRIBUTES_ITEMS_COUNT

ATTRIBUTES_ITEMS_COUNT: number

Defined in

sigma/src/rendering/program.ts:98


CONSTANT_ATTRIBUTES

CONSTANT_ATTRIBUTES: ProgramAttributeSpecification[]

Implementation of

InstancedProgramDefinition.CONSTANT_ATTRIBUTES

Defined in

sigma/src/rendering/program.ts:95


CONSTANT_DATA

CONSTANT_DATA: number[][]

Implementation of

InstancedProgramDefinition.CONSTANT_DATA

Defined in

sigma/src/rendering/program.ts:96


FRAGMENT_SHADER_SOURCE

FRAGMENT_SHADER_SOURCE: string

Implementation of

InstancedProgramDefinition.FRAGMENT_SHADER_SOURCE

Defined in

sigma/src/rendering/program.ts:91


METHOD

METHOD: number

Implementation of

InstancedProgramDefinition.METHOD

Defined in

sigma/src/rendering/program.ts:94


STRIDE

STRIDE: number

Defined in

sigma/src/rendering/program.ts:99


UNIFORMS

UNIFORMS: readonly Uniform[]

Implementation of

InstancedProgramDefinition.UNIFORMS

Defined in

sigma/src/rendering/program.ts:92


VERTEX_SHADER_SOURCE

VERTEX_SHADER_SOURCE: string

Implementation of

InstancedProgramDefinition.VERTEX_SHADER_SOURCE

Defined in

sigma/src/rendering/program.ts:90


VERTICES

VERTICES: number

Implementation of

InstancedProgramDefinition.VERTICES

Defined in

sigma/src/rendering/program.ts:89


array

array: Float32Array

Defined in

sigma/src/rendering/program.ts:102


capacity

capacity: number = 0

Defined in

sigma/src/rendering/program.ts:104


constantArray

constantArray: Float32Array

Defined in

sigma/src/rendering/program.ts:103


isInstanced

isInstanced: boolean

Defined in

sigma/src/rendering/program.ts:110


normalProgram

normalProgram: ProgramInfo<string>

Defined in

sigma/src/rendering/program.ts:107


pickProgram

pickProgram: null | ProgramInfo<string>

Defined in

sigma/src/rendering/program.ts:108


renderer

renderer: Sigma<N, E, G>

Defined in

sigma/src/rendering/program.ts:101


verticesCount

verticesCount: number = 0

Defined in

sigma/src/rendering/program.ts:105

Methods

bindAttribute

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

Parameters

NameType
attrProgramAttributeSpecification
programProgramInfo<string>
offsetnumber
setDivisor?boolean

Returns

number

Defined in

sigma/src/rendering/program.ts:268


bindProgram

bindProgram(program): void

Parameters

NameType
programProgramInfo<string>

Returns

void

Defined in

sigma/src/rendering/program.ts:230


drawWebGL

drawWebGL(method, «destructured»): void

Parameters

NameType
methodnumber
«destructured»ProgramInfo<string>

Returns

void

Defined in

sigma/src/rendering/program.ts:379


getDefinition

getDefinition(): ProgramDefinition<Uniform> | InstancedProgramDefinition<Uniform>

Returns

ProgramDefinition<Uniform> | InstancedProgramDefinition<Uniform>

Defined in

sigma/src/rendering/program.ts:112


getProgramInfo

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

Parameters

NameType
name"normal" | "pick"
glWebGLRenderingContext | WebGL2RenderingContext
vertexShaderSourcestring
fragmentShaderSourcestring
frameBuffernull | WebGLFramebuffer

Returns

ProgramInfo<string>

Defined in

sigma/src/rendering/program.ts:176


hasNothingToRender

hasNothingToRender(): boolean

Returns

boolean

Defined in

sigma/src/rendering/program.ts:336


kill

kill(): void

Returns

void

Implementation of

AbstractProgram.kill

Defined in

sigma/src/rendering/program.ts:174


reallocate

reallocate(capacity): void

Parameters

NameType
capacitynumber

Returns

void

Implementation of

AbstractProgram.reallocate

Defined in

sigma/src/rendering/program.ts:321


render

render(params): void

Parameters

NameType
paramsRenderParams

Returns

void

Implementation of

AbstractProgram.render

Defined in

sigma/src/rendering/program.ts:358


renderProgram

renderProgram(params, programInfo): void

Parameters

NameType
paramsRenderParams
programInfoProgramInfo<string>

Returns

void

Defined in

sigma/src/rendering/program.ts:342


setUniforms

setUniforms(params, programInfo): void

Parameters

NameType
paramsRenderParams
programInfoProgramInfo<string>

Returns

void

Defined in

sigma/src/rendering/program.ts:340


unbindAttribute

unbindAttribute(attr, program, unsetDivisor?): void

Parameters

NameType
attrProgramAttributeSpecification
programProgramInfo<string>
unsetDivisor?boolean

Returns

void

Defined in

sigma/src/rendering/program.ts:303


unbindProgram

unbindProgram(program): void

Parameters

NameType
programProgramInfo<string>

Returns

void

Defined in

sigma/src/rendering/program.ts:259