Class TextureProgram
Fields
| Name | Type | Description |
|---|---|---|
texCoordLocation
|
int | |
currentProgram
|
uint | |
vao
|
GLObject!(1,0) | |
_attribIdLocations
|
int[9] | |
_attribLocations
|
int[string] | |
_refCount
|
int | count of references to this object from Ref |
_uniformIdLocations
|
int[29] | |
_uniformLocations
|
int[string] | |
colAttrLocation
|
int | |
error
|
bool | |
initialized
|
bool | |
matrixLocation
|
int | |
program
|
uint | |
vertexLocation
|
int |
Properties
| Name | Type | Description |
|---|---|---|
fragmentSource[get]
|
string | |
vertexSource[get]
|
string | |
refCount[get]
|
int | returns current value of reference counter |
Methods
| Name | Description |
|---|---|
drawBatch
(texture, linear, length, start)
|
|
getVertexElementLocation
(type)
|
get location for vertex attribute |
initLocations
()
|
override to init shader code locations |
addRef
()
|
increments reference counter |
bind
()
|
binds program to current context |
check
()
|
returns true if program is ready for use |
compile
()
|
|
destroyBuffers
()
|
|
draw
(mesh, wireframe)
|
draw mesh using this program (program should be bound by this time and all uniforms should be set) |
drawBatch
(length, start, areLines)
|
|
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 |
hasUniform
(id)
|
returns true if effect has uniform |
initStandardLocations
()
|
|
releaseRef
()
|
decrement reference counter, destroy object if no more references left |
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 |
createVAO
(verticesBufferLength, colorsBufferLength)
|
|
beforeExecute
()
|
|
createVAO
(verticesBufferLength)
|
Aliases
| Name | Description |
|---|---|
~this
|