org.digimead.digi.lib.opengl

Vertices

class Vertices extends AnyRef

create the vertices/indices as specified (for 2d/3d)

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Vertices
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Vertices(gl: GL10, maxVertices: Int, maxIndices: Int, hasColor: Boolean, hasTexCoords: Boolean, hasNormals: Boolean)

  2. new Vertices(gl: GL10, maxVertices: Int, maxIndices: Int, hasColor: Boolean, hasTexCoords: Boolean, hasNormals: Boolean, use3D: Boolean)

    gl

    the GL interface.

    maxVertices

    maximum vertices allowed in buffer

    maxIndices

    maximum indices allowed in buffer

    hasColor

    use color values in vertices

    hasTexCoords

    use texture coordinates in vertices

    hasNormals

    use normals in vertices

    use3D

    (false, default) use 2d positions (ie. x/y only), (true) use 3d positions (ie. x/y/z)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val COLOR_CNT: Int

    Number of Components in Vertex Color

  7. val INDEX_SIZE: Int

    Index Byte Size (Short.

    Index Byte Size (Short.SIZE = bits)

  8. val NORMAL_CNT: Int

    Number of Components in Vertex Normal

  9. val POSITION_CNT_2D: Int

    Number of Components in Vertex Position for 2D

  10. val POSITION_CNT_3D: Int

    Number of Components in Vertex Position for 3D

  11. val TEXCOORD_CNT: Int

    Number of Components in Vertex Texture Coords

  12. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  13. def bind(): Unit

    perform all required binding/state changes before rendering batches.

    perform all required binding/state changes before rendering batches.

    call once before calling draw() multiple times for this buffer.

  14. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. def draw(primitiveType: Int, offset: Int, numVertices: Int): Unit

    draw the currently bound vertices in the vertex/index buffers

    draw the currently bound vertices in the vertex/index buffers

    can only be called after calling bind() for this buffer.

    primitiveType

    the type of primitive to draw

    offset

    the offset in the vertex/index buffer to start at

    numVertices

    the number of vertices (indices) to draw

  16. def drawFull(primitiveType: Int, offset: Int, numVertices: Int): Unit

    draw the vertices in the vertex/index buffers

    draw the vertices in the vertex/index buffers

    primitiveType

    the type of primitive to draw

    offset

    the offset in the vertex/index buffer to start at

    numVertices

    the number of vertices (indices) to draw

    Note

    unoptimized version! use bind()/draw()/unbind() for batches

  17. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  20. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  21. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  22. val indices: ShortBuffer

    Index Buffer

    Index Buffer

    Attributes
    protected
  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  27. var numIndices: Int

    Number of Indices in Buffer

    Number of Indices in Buffer

    Attributes
    protected
  28. var numVertices: Int

    Number of Vertices in Buffer

    Number of Vertices in Buffer

    Attributes
    protected
  29. val positionCnt: Int

    Number of Position Components (2=2D, 3=3D)

  30. def setIndices(indices: Array[Short], offset: Int, length: Int): Unit

    set the specified indices in the index buffer

    set the specified indices in the index buffer

    indices

    array of indices (shorts) to set

    offset

    offset to first index in array

    length

    number of indices in array (from offset)

  31. def setVertices(vertices: Array[Float], offset: Int, length: Int): Unit

    set the specified vertices in the vertex buffer

    set the specified vertices in the vertex buffer

    vertices

    array of vertices (floats) to set

    offset

    offset to first vertex in array

    length

    number of floats in the vertex array (total) for easy setting use: vtx_cnt * (this.vertexSize / 4)

    Note

    optimized to use integer buffer!

  32. def setVtxColor(vtxIdx: Int, a: Float): Unit

    set vertex elements - use this method to alter the color values for vertices

    set vertex elements - use this method to alter the color values for vertices

    vtxIdx

    vertex index

    a

    the a color to set in buffer

    Note

    it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!

  33. def setVtxColor(vtxIdx: Int, r: Float, g: Float, b: Float): Unit

    set vertex elements - use this method to alter the color values for vertices

    set vertex elements - use this method to alter the color values for vertices

    vtxIdx

    vertex index

    r

    the r color to set in buffer

    g

    the g color to set in buffer

    b

    the b color to set in buffer

    Note

    it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!

  34. def setVtxColor(vtxIdx: Int, r: Float, g: Float, b: Float, a: Float): Unit

    set vertex elements - use this method to alter the color values for vertices

    set vertex elements - use this method to alter the color values for vertices

    vtxIdx

    vertex index

    r

    the r color to set in buffer

    g

    the g color to set in buffer

    b

    the b color to set in buffer

    a

    the a color to set in buffer

    Note

    it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!

  35. def setVtxNormal(vtxIdx: Int, x: Float, y: Float, z: Float): Unit

    set vertex elements - use this method to alter the normals values for vertices

    set vertex elements - use this method to alter the normals values for vertices

    Note

    it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!

  36. def setVtxPosition(vtxIdx: Int, x: Float, y: Float, z: Float): Unit

    set vertex elements - use this method to alter the position values for vertices

    set vertex elements - use this method to alter the position values for vertices

    vtxIdx

    vertex index

    x

    the x position to set in buffer

    y

    the y position to set in buffer

    z

    the z position to set in buffer

    Note

    it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!

  37. def setVtxPosition(vtxIdx: Int, x: Float, y: Float): Unit

    set vertex elements - use this method to alter the position values for vertices

    set vertex elements - use this method to alter the position values for vertices

    vtxIdx

    vertex index

    x

    the x position to set in buffer

    y

    the y position to set in buffer

    Note

    it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!

  38. def setVtxTexCoords(vtxIdx: Int, u: Float, v: Float): Unit

    set vertex elements - use this method to alter the textcoords values for vertices

    set vertex elements - use this method to alter the textcoords values for vertices

    vtxIdx

    vertex index

    u

    the u texture coords to set in buffer

    v

    the v texture coords to set in buffer

    Note

    it do NOT validate any values, ensure that the index AND specified elements EXIST before using!!

  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  40. val tmpBuffer: Array[Int]

    Temp Buffer for Vertex Conversion

    Temp Buffer for Vertex Conversion

    Attributes
    protected
  41. def toString(): String

    Definition Classes
    AnyRef → Any
  42. def unbind(): Unit

    clear binding states when done rendering batches.

    clear binding states when done rendering batches.

    call once before calling draw() multiple times for this buffer.

  43. val vertexSize: Int

    Bytesize of a Single Vertex

  44. val vertexStride: Int

    Vertex Stride (Element Size of a Single Vertex)

  45. val vertices: IntBuffer

    Vertex Buffer

    Vertex Buffer

    Attributes
    protected
  46. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  47. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  48. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any