javax.media.opengl

## Class GLUniformData

- java.lang.Object
- - javax.media.opengl.GLUniformData

-     public class GLUniformData
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GLUniformData(String name, float val)` float atom Number of objects is 1
    `GLUniformData(String name, int val)` int atom Number of objects is 1
    `GLUniformData(String name, int components, FloatBuffer data)` Multiple FloatBuffer Vector Number of objects is calculated by data.limit()/components
    `GLUniformData(String name, int components, IntBuffer data)` Multiple IntBuffer Vector Number of objects is calculated by data.limit()/components
    `GLUniformData(String name, int rows, int columns, FloatBuffer data)` Multiple FloatBuffer Matrix Number of objects is calculated by data.limit()/(rows*columns)

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `columns()`
    `int` | `components()`
    `int` | `count()`
    `static GLUniformData` | `creatEmptyMatrix(String name, int rows, int columns)`
    `static GLUniformData` | `creatEmptyVector(String name, int components)`
    `FloatBuffer` | `floatBufferValue()`
    `float` | `floatValue()`
    `Buffer` | `getBuffer()`
    `int` | `getLocation()`
    `String` | `getName()`
    `Object` | `getObject()`
    `IntBuffer` | `intBufferValue()`
    `int` | `intValue()`
    `boolean` | `isBuffer()`
    `boolean` | `isMatrix()`
    `int` | `rows()`
    `GLUniformData` | `setData(float data)`
    `GLUniformData` | `setData(FloatBuffer data)`
    `GLUniformData` | `setData(int data)`
    `GLUniformData` | `setData(IntBuffer data)`
    `int` | `setLocation(GL2ES2 gl, int program)` Retrieves the location of the shader uniform from the linked shader program.
    `int` | `setLocation(int location)` Sets the given location of the shader uniform.
    `String` | `toString()`
    `StringBuilder` | `toString(StringBuilder sb)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### GLUniformData

          public GLUniformData(String name,
                       int val)

      int atom Number of objects is 1

    - #### GLUniformData

          public GLUniformData(String name,
                       float val)

      float atom Number of objects is 1

    - #### GLUniformData

          public GLUniformData(String name,
                       int components,
                       IntBuffer data)

      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

          public GLUniformData(String name,
                       int components,
                       FloatBuffer data)

      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

          public GLUniformData(String name,
                       int rows,
                       int columns,
                       FloatBuffer data)

      Multiple FloatBuffer Matrix Number of objects is calculated by data.limit()/(rows*columns)
      Parameters:
        `rows` - the matrix rows
        `column` - the matrix column

  - ### Method Detail

    - #### creatEmptyVector

          public static GLUniformData creatEmptyVector(String name,
                                       int components)

    - #### creatEmptyMatrix

          public static GLUniformData creatEmptyMatrix(String name,
                                       int rows,
                                       int columns)

    - #### setData

          public GLUniformData setData(int data)

    - #### setData

          public GLUniformData setData(float data)

    - #### setData

          public GLUniformData setData(IntBuffer data)

    - #### setData

          public GLUniformData setData(FloatBuffer data)

    - #### intValue

          public int intValue()

    - #### floatValue

          public float floatValue()

    - #### intBufferValue

          public IntBuffer intBufferValue()

    - #### floatBufferValue

          public FloatBuffer floatBufferValue()

    - #### toString

          public StringBuilder toString(StringBuilder sb)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getName

          public String getName()

    - #### getLocation

          public int getLocation()

    - #### setLocation

          public int setLocation(int location)

      Sets the given location of the shader uniform.
      Returns:
        the given location

    - #### setLocation

          public int setLocation(GL2ES2 gl,
                        int program)

      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

          public Object getObject()

    - #### getBuffer

          public Buffer 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()

Copyright 2010 JogAmp Community.