Package com.jogamp.opengl
Class GLUniformData
java.lang.Object
com.jogamp.opengl.GLUniformData
-
Constructor Summary
ConstructorsConstructorDescriptionGLUniformData
(String name, float val) float atom Number of objects is 1GLUniformData
(String name, int val) int atom Number of objects is 1GLUniformData
(String name, int rows, int columns, FloatBuffer data) Multiple FloatBuffer Matrix Number of objects is calculated by data.limit()/(rows*columns)GLUniformData
(String name, int components, FloatBuffer data) Multiple FloatBuffer Vector Number of objects is calculated by data.limit()/componentsGLUniformData
(String name, int components, IntBuffer data) Multiple IntBuffer Vector Number of objects is calculated by data.limit()/components -
Method Summary
Modifier and TypeMethodDescriptionint
columns()
int
int
count()
static GLUniformData
creatEmptyMatrix
(String name, int rows, int columns) static GLUniformData
creatEmptyVector
(String name, int components) float
int
getName()
int
intValue()
boolean
isBuffer()
boolean
isMatrix()
int
rows()
setData
(float data) setData
(int data) setData
(FloatBuffer data) int
setLocation
(int location) Sets the given location of the shader uniform.int
setLocation
(GL2ES2 gl, int program) Retrieves the location of the shader uniform from the linked shader program.toString()
-
Constructor Details
-
GLUniformData
int atom Number of objects is 1 -
GLUniformData
float atom Number of objects is 1 -
GLUniformData
Multiple IntBuffer Vector Number of objects is calculated by data.limit()/components- Parameters:
components
- number of elements of one object, ie 4 for GL_FLOAT_VEC4,
-
GLUniformData
Multiple FloatBuffer Vector Number of objects is calculated by data.limit()/components- Parameters:
components
- number of elements of one object, ie 4 for GL_FLOAT_VEC4,
-
GLUniformData
Multiple FloatBuffer Matrix Number of objects is calculated by data.limit()/(rows*columns)- Parameters:
rows
- the matrix rowscolumn
- the matrix column
-
-
Method Details
-
creatEmptyVector
-
creatEmptyMatrix
-
setData
-
setData
-
setData
-
setData
-
intValue
public int intValue() -
floatValue
public float floatValue() -
intBufferValue
-
floatBufferValue
-
toString
-
toString
-
getName
-
getLocation
public int getLocation() -
setLocation
public int setLocation(int location) Sets the given location of the shader uniform.- Returns:
- the given location
-
setLocation
Retrieves the location of the shader uniform from the linked shader program.No validation is performed within the implementation.
- Parameters:
gl
-program
-- Returns:
- ≥0 denotes a valid uniform location as found and used in the given shader program. <0 denotes an invalid location, i.e. not found or used in the given shader program.
-
getObject
-
getBuffer
-
isBuffer
public boolean isBuffer() -
isMatrix
public boolean isMatrix() -
count
public int count() -
components
public int components() -
rows
public int rows() -
columns
public int columns()
-