VertexArray

Represent an OpenGL vertex array. The vertex data must be set with {@link #setData(org.spout.renderer.api.data.VertexData)} before it can be created.

Members

Functions

destroy
void destroy()
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw()

Draws the primitives defined by the vertex data.

getID
uint getID()

Gets the ID for this vertex array as assigned by OpenGL.

setData
void setData(VertexData vertexData)

Sets the vertex data source to use. The indices offset is kept but maybe reduced if it doesn't fit inside the new data. The count is set to the size from the offset to the end of the data.

setDrawingMode
void setDrawingMode(DrawingMode mode)

Sets the vertex array's drawing mode.

setIndicesCount
void setIndicesCount(uint count)

Sets the number of indices to render during each draw call, starting at the offset set by {@link #setIndicesOffset(int)}. Setting this to a value smaller than zero results in rendering of the whole list. If the value is larger than the list (starting at the offset), it will be maxed to that value.

setIndicesOffset
void setIndicesOffset(uint offset)

Sets the starting offset in the indices buffer. Defaults to 0.

setPolygonMode
void setPolygonMode(PolygonMode mode)

Sets the vertex array's polygon mode. This describes how to rasterize each primitive. The default is {@link org.spout.renderer.api.gl.VertexArray.PolygonMode#FILL}. This can be used to draw only the wireframes of the polygons.

Variables

id
uint id;
Undocumented in source.

Inherited Members

From Creatable

create
void create()

Creates the resources. It can now be used.

destroy
void destroy()

Releases the resource. It can not longer be used.

isCreated
bool isCreated()

Returns true if the resource was created and is ready for use, false if otherwise.

checkCreated
void checkCreated()

Throws an exception if the resource hasn't been created yet.

checkNotCreated
void checkNotCreated()

Throws an exception if the resource has been created already.

From GLVersioned

getGLVersion
GLVersion getGLVersion()

Returns the lowest OpenGL version required by this object's implementation.

Meta