Maven module :un.engine : engine-opengl-util :
Class : un.impl.opengl.resource.IndexRange
Extends/Implements : -
Subclasses : -

Define and index for drawing.
This range can be used with or without an IBO.
author  Johann Sorel


Variables : -
Functions : POINTS, LINE_STRIP, LINE_LOOP, LINES, LINE_STRIP_ADJACENCY, LINES_ADJACENCY, TRIANGLE_STRIP, TRIANGLE_FAN, TRIANGLES, TRIANGLE_STRIP_ADJACENCY, TRIANGLES_ADJACENCY, PATCHES, IndexRange, getMode, getIndexValueType, getTupleSize, getBytesOffset, getIndexOffset, getCount, draw, drawInstanced



public IndexRange POINTS (int offset, int count)

public IndexRange LINE_STRIP (int offset, int count)

public IndexRange LINE_LOOP (int offset, int count)

public IndexRange LINES (int offset, int count)


OpenGL constraints : GL3
public IndexRange LINE_STRIP_ADJACENCY (int offset, int count)


OpenGL constraints : GL3
public IndexRange LINES_ADJACENCY (int offset, int count)

public IndexRange TRIANGLE_STRIP (int offset, int count)

public IndexRange TRIANGLE_FAN (int offset, int count)

public IndexRange TRIANGLES (int offset, int count)


OpenGL constraints : GL3
public IndexRange TRIANGLE_STRIP_ADJACENCY (int offset, int count)


OpenGL constraints : GL3
public IndexRange TRIANGLES_ADJACENCY (int offset, int count)


OpenGL constraints : GL3
public IndexRange PATCHES (int tupleSize, int offset, int count)


param  mode GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,
GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP,
GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY,
GL_TRIANGLES_ADJACENCY and GL_PATCHES
param  indexValueType GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT.
param  tupleSize informative value of the number of element to mmake a tuple.
param  offset offset from the beginning of the IBO
do not multiply by the number of byte of the index value type.
multiplication will be done automaticaly
param  count number of values from offset in the IBO
public void IndexRange (int mode, int indexValueType, int tupleSize, int offset, int count)


Range mode.
GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,
GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP,
GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY,
GL_TRIANGLES_ADJACENCY or GL_PATCHES
return  int
public int getMode ()


Type of values in the index.
GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT.
This value has meaning only when used with an IBO.
return  int
public int getIndexValueType ()


Informative value of the number of element to mmake a tuple.
return  int
public int getTupleSize ()


Offset from the beginning of the IBO.
Offset is in BYTES.
return  int Offset in bytes.
public int getBytesOffset ()


Offset from the beginning of the IBO.
Offset is an index for the buffer.
return  int Offset in elements in the buffer.
public int getIndexOffset ()


Number of values in the index range.
If used with an IBO, this is the number of values from offset in the IBO.
return  int
public int getCount ()

public void draw (GL gl, boolean withIBO)

public void drawInstanced (GL gl, boolean withIBO, int nbInstance)