Class JoGLElementsBuffer

    • Field Detail

      • ELEMENT_SIZE

        public static final int ELEMENT_SIZE
        The current size of one element.
        See Also:
        Constant Field Values
    • Method Detail

      • setData

        public void setData​(float[] newData,
                            int elementSize)
        Description copied from interface: ElementsBuffer
        Set the data.
        Specified by:
        setData in interface ElementsBuffer
        Parameters:
        newData - the new data.
        elementSize - the size of data elements.
      • setData

        public void setData​(java.lang.Float[] newData,
                            int elementSize)
        Description copied from interface: ElementsBuffer
        Set the data.
        Specified by:
        setData in interface ElementsBuffer
        Parameters:
        newData - the new data.
        elementSize - the size of data elements.
      • setData

        public void setData​(java.nio.FloatBuffer newData,
                            int elementsSize)
        Description copied from interface: ElementsBuffer
        Set the data.
        Specified by:
        setData in interface ElementsBuffer
        Parameters:
        newData - the new data.
        elementsSize - the size of data elements.
      • getSize

        public int getSize()
        Description copied from interface: DataBuffer
        Return the number of elements.
        Specified by:
        getSize in interface DataBuffer
        Returns:
        the number of elements.
      • getElementsSize

        public int getElementsSize()
        Description copied from interface: ElementsBuffer
        Return the number of coordinate for one element.
        Specified by:
        getElementsSize in interface ElementsBuffer
        Returns:
        the number of coordinate for one element.
      • getByteSize

        public int getByteSize()
        Description copied from class: JoGLDataBuffer
        Return the size of this buffer in byte.
        Specified by:
        getByteSize in class JoGLDataBuffer
        Returns:
        the size of this buffer in byte.
      • getByteBuffer

        protected java.nio.Buffer getByteBuffer()
        Description copied from class: JoGLDataBuffer
        Return the data as byte buffer.
        Specified by:
        getByteBuffer in class JoGLDataBuffer
        Returns:
        the data as byte buffer.
      • getGLBindDestination

        protected int getGLBindDestination()
        Description copied from class: JoGLDataBuffer
        Return the OpenGl bind destination.
        Specified by:
        getGLBindDestination in class JoGLDataBuffer
        Returns:
        the OpenGl bind destination.
      • bindAsVertexBuffer

        public int bindAsVertexBuffer​(com.jogamp.opengl.GL2 gl)
      • bindAsNormalsBuffer

        public int bindAsNormalsBuffer​(com.jogamp.opengl.GL2 gl)
      • bindAsColorsBuffer

        public int bindAsColorsBuffer​(com.jogamp.opengl.GL2 gl)
      • bindAsTextureCoordinatesBuffer

        public int bindAsTextureCoordinatesBuffer​(com.jogamp.opengl.GL2 gl)