Presents a simple interface to communicate with a ESSL (GLSL) programThis class is responsible for creating, compiling and linking any ESSL program.It also has methods to query and set uniforms and attributes belonging to the programthat is being currently executed in the GPU
a vxlProgramManager maintains a database of the programs that have been linked to the GPU. This way, program switching is easier as it is not necessary to go through the compilation and linking process every time
The program manager simplifies working with ESSL programs. It providesget/set operations for attributes and uniforms and handles internally the location variablesof these elements which are required to operate with them in the GPU. In other wordsit hides gl.getAttribLocation and gl.getUniformLocation calls.
The program manager catches uniforms and only updates the GPU if needed.
The program manager is available through the pm
attribute of vxlEngine
Parameters:
gl
|
|
Parameters:
Type | Name | Description |
---|---|---|
String |
name
|
the name of the attribute array to disable |
Parameters:
Type | Name | Description |
---|---|---|
String |
name
|
the name of the attribute array to enable |
Parameters:
Type | Name | Description |
---|---|---|
programID
|
|
|
uniformName
|
|
Parameters:
Type | Name | Description |
---|---|---|
String |
the
|
uniform id |
Parameters:
Type | Name | Description |
---|---|---|
String |
name
|
name of the attribute |
numElements
|
|
|
type
|
|
|
norm
|
|
|
stride
|
|
|
offset
|
|
Parameters:
Type | Name | Description |
---|---|---|
programID
|
|
|
uniformName
|
|
|
value
|
|
Parameters:
Type | Name | Description |
---|---|---|
vxlProgram |
p_program
|
an instance of a vxlProgram object or one of its descendants |
p_force_it
|
|
Parameters:
Type | Name | Description |
---|---|---|
String |
p_uniform_id
|
name |
Object |
p_value
|
the uniform value |
hint
|
|
Parameters:
Type | Name | Description |
---|---|---|
Object |
p_dictionary
|
an object containing uniform names and values. Every property of this objectwill be considered a uniform |
Parameters:
Type | Name | Description |
---|---|---|
String |
ID
|
the program id |
See:
vxlRenderer#setProgram