Home Reference Source Repository
import {ShaderBank} from 'dh3dlib/js/base/ShaderBank.js'
public class | source

ShaderBank

ShaderBank class

Constructor Summary

Public Constructor
public

constructor

Method Summary

Public Methods
public

getShader(name: string): WebGLShader

get registered shader of given name

public

getShaderOfContext(name: string, context: WebGLContext): WebGLShader

get registered shader of given name and context

public

registShader(shader: WebGLShader): void

regist shader

Public Constructors

public constructor source

constructor

Public Methods

public getShader(name: string): WebGLShader source

get registered shader of given name

Params:

NameTypeAttributeDescription
name string

name of shader

Return:

WebGLShader

shader object

public getShaderOfContext(name: string, context: WebGLContext): WebGLShader source

get registered shader of given name and context

Params:

NameTypeAttributeDescription
name string

name of shader

context WebGLContext

context of shader

Return:

WebGLShader

shader object

public registShader(shader: WebGLShader): void source

regist shader

Params:

NameTypeAttributeDescription
shader WebGLShader

shader

Return:

void