Class GLArrayDataWrapper

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean DEBUG  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void associate​(Object obj, boolean enable)
      Implementation and type dependent object association.
      int bytePosition()
      Returns the bytes position.
      static GLArrayDataWrapper createFixed​(int index, int comps, int dataType, boolean normalized, int stride, int mappedElementCount, int vboName, long vboOffset, int vboUsage, int vboTarget)
      Create a VBO, using a predefined fixed function array index, wrapping the mapped data characteristics.
      static GLArrayDataWrapper createFixed​(int index, int comps, int dataType, boolean normalized, int stride, Buffer buffer, int vboName, long vboOffset, int vboUsage, int vboTarget)
      Create a VBO, using a predefined fixed function array index, wrapping the given data.
      static GLArrayDataWrapper createGLSL​(String name, int comps, int dataType, boolean normalized, int stride, int mappedElementCount, int vboName, long vboOffset, int vboUsage, int vboTarget)
      Create a VBO, using a custom GLSL array attribute name, wrapping the mapped data characteristics.
      static GLArrayDataWrapper createGLSL​(String name, int comps, int dataType, boolean normalized, int stride, Buffer buffer, int vboName, long vboOffset, int vboUsage, int vboTarget)
      Create a VBO, using a custom GLSL array attribute name, wrapping the given data.
      void destroy​(GL gl)  
      int elemPosition()
      Returns the element position.
      String elemStatsToString()
      Returns a string with detailed buffer element stats, i.e.
      String fillStatsToString()
      Returns a string with detailed buffer fill stats.
      Buffer getBuffer()
      The Buffer holding the data, may be null if a GPU buffer without client bound data
      Class<?> getBufferClass()  
      static Class<?> getBufferClass​(int dataType)  
      int getByteCapacity()
      Return the capacity in bytes.
      int getByteCount()
      Returns the byte position (written elements) if not GLArrayData.sealed() or the byte limit (available to read) after GLArrayData.sealed() (flip).
      int getBytesPerComp()
      The component's size in bytes
      int getCompsPerElem()
      The number of components per element
      int getCompType()
      The component's GL data type, ie.
      int getElemCapacity()
      Return the element capacity.
      int getElemCount()
      Returns the element position (written elements) if not GLArrayData.sealed() or the element limit (available to read) after GLArrayData.sealed() (flip).
      int getIndex()
      The index of the predefined array index, see list below, or -1 in case of a shader attribute array.
      int getLocation()
      Returns the shader attribute location for this name, -1 if not yet determined
      String getName()
      The name of the reflecting shader array attribute.
      boolean getNormalized()
      True, if GL shall normalize fixed point data while converting them into float.
      int getStride()  
      int getVBOName()
      The VBO name or 0 if not a VBO
      long getVBOOffset()
      The VBO buffer offset or 0 if not a VBO
      int getVBOTarget()
      The VBO target or 0 if not a VBO
      int getVBOUsage()
      The VBO usage or 0 if not a VBO
      boolean isVBO()
      Determines whether the data is server side (VBO) and enabled, or a client side array (false).
      boolean isVertexAttribute()
      Returns true if this data set is intended for a GLSL vertex shader attribute, otherwise false, ie intended for fixed function vertex pointer
      int remainingBytes()
      The current number of remaining bytes.
      int remainingElems()
      The current number of remaining elements.
      boolean sealed()
      Returns true if data has been sealed (flipped to read), otherwise false (writing mode).
      int setLocation​(int v)
      Sets the given location of the shader attribute
      int setLocation​(GL2ES2 gl, int program)
      Retrieves the location of the shader attribute from the linked shader program.
      int setLocation​(GL2ES2 gl, int program, int location)
      Binds the location of the shader attribute to the given location for the unlinked shader program.
      void setName​(String newName)
      Set a new name for this array.
      void setVBOEnabled​(boolean vboEnabled)
      Enable or disable use of VBO.
      void setVBOName​(int vboName)
      Set the VBO buffer name, if valid (!= 0) enable use of VBO, otherwise (==0) disable VBO usage.
      void setVBOTarget​(int vboTarget)  
      void setVBOUsage​(int vboUsage)  
      String toString()  
      boolean validate​(GLProfile glp, boolean throwException)
      Validates this instance's parameter.