VertexAttribute

Represents a vertex attribute. It has a name, a data type, a size (the number of components) and data.

Constructors

this
this(string name, DataType type, uint size)

Creates a new vertex attribute from the name, the data type and the size. The upload mode will be {@link UploadMode#TO_FLOAT}.

this
this(string name, DataType type, uint size, UploadMode uploadMode)

Creates a new vertex attribute from the name, the data type, the size and the upload mode.

Members

Functions

clearData
void clearData()

Clears all of the buffer data.

clone
VertexAttribute clone()
Undocumented in source. Be warned that the author may not have intended to support it.
getData
ubyte[] getData()

Returns a new byte buffer filled and ready to read, containing the attribute data. This method will {@link java.nio.ByteBuffer#flip()} the buffer before returning it.

getName
string getName()

Returns the name of the attribute.

getSize
uint getSize()

Return the size of the attribute.

getType
DataType getType()

Returns the data type of the attribute.

getUploadMode
UploadMode getUploadMode()

Returns the upload mode for this attribute.

setData
void setData(ubyte[] buffer)

Replaces the current buffer data with a copy of the given {@link java.nio.ByteBuffer} This method arbitrarily creates data for the ByteBuffer regardless of the data type of the vertex attribute.

Variables

name
string name;
Undocumented in source.
size
uint size;
Undocumented in source.
type
DataType type;
Undocumented in source.
uploadMode
UploadMode uploadMode;
Undocumented in source.

Meta