Class GLProgram
Fields
| Name | Type | Description |
|---|---|---|
currentProgram
|
uint | |
_attribIdLocations
|
int[9] | |
_attribLocations
|
int[string] | |
_uniformIdLocations
|
int[29] | |
_uniformLocations
|
int[string] | |
error
|
bool | |
initialized
|
bool | |
program
|
uint | |
_refCount
|
int | count of references to this object from Ref |
Properties
| Name | Type | Description |
|---|---|---|
fragmentSource[get]
|
string | |
vertexSource[get]
|
string | |
refCount[get]
|
int | returns current value of reference counter |
Methods
| Name | Description |
|---|---|
bind
()
|
binds program to current context |
check
()
|
returns true if program is ready for use |
compile
()
|
|
draw
(mesh, wireframe)
|
draw mesh using this program (program should be bound by this time and all uniforms should be set) |
getAttribLocation
(id)
|
get attribute location from program by uniform id, returns -1 if location is not found |
getAttribLocation
(variableName)
|
get attribute location from program, returns -1 if location is not found |
getUniformLocation
(uniform)
|
get uniform location from program by uniform id, returns -1 if location is not found |
getUniformLocation
(variableName)
|
get uniform location from program, returns -1 if location is not found |
getVertexElementLocation
(type)
|
get location for vertex attribute |
hasUniform
(id)
|
returns true if effect has uniform |
initLocations
()
|
override to init shader code locations |
initStandardLocations
()
|
|
setUniform
(uniformName, vec)
|
|
setUniform
(id, vec)
|
|
setUniform
(uniformName, vec)
|
|
setUniform
(id, vec)
|
|
setUniform
(uniformName, vec)
|
|
setUniform
(id, vec)
|
|
setUniform
(uniformName, vec)
|
|
setUniform
(id, vec)
|
|
setUniform
(uniformName, vec)
|
|
setUniform
(id, vec)
|
|
setUniform
(uniformName, vec)
|
|
setUniform
(id, vec)
|
|
setUniform
(uniformName, matrix)
|
|
setUniform
(id, matrix)
|
|
setUniform
(uniformName, matrix)
|
|
setUniform
(id, matrix)
|
|
setUniform
(uniformName, v)
|
|
setUniform
(id, v)
|
|
setUniform
(uniformName, v)
|
|
setUniform
(id, v)
|
|
unbind
()
|
unbinds program from current context |
addRef
()
|
increments reference counter |
releaseRef
()
|
decrement reference counter, destroy object if no more references left |
Aliases
| Name | Description |
|---|---|
~this
|