40#ifndef GLS_VERTEX_ARRAY_H
41#define GLS_VERTEX_ARRAY_H
60 static const GLuint
VERT_SIZE =
sizeof( float ) * 3;
61 static const GLuint
TEX_SIZE =
sizeof( float ) * 2;
63 static const GLuint
COLOR_SIZE =
sizeof(
unsigned char ) * 4;
79 GLS_EXPORT void Setup(
const int nVerts,
const bool hasT,
const bool hasC,
const bool hasN );
156 const bool texture,
const bool color,
const bool normal );
171 GLS_EXPORT void MultiDraw(
const unsigned int glPrimitive,
const unsigned int offset,
const unsigned int count,
const unsigned int primitiveSize,
GlsIndexArray& indexBuffer,
IGlsStateManager* stateManager,
const bool texture,
const bool color,
const bool normal );
Definition: gls_index_array.h:50
Definition: gls_vertex_array.h:58
virtual ~GlsVertexArray()
static const GLuint TEX_SIZE
Size of a texture coordinate in bytes.
Definition: gls_vertex_array.h:61
void Draw(const unsigned int glPrimitive, IGlsStateManager *stateManager, const bool texture, const bool color, const bool normal)
unsigned int _bufferSize
Definition: gls_vertex_array.h:177
bool _hasC
Definition: gls_vertex_array.h:182
void SetNormals(const Vector verts[])
void Setup(const int nVerts, const bool hasT, const bool hasC, const bool hasN)
unsigned char * _vertexData
Definition: gls_vertex_array.h:174
unsigned int _componentSize
Definition: gls_vertex_array.h:184
static const GLuint COLOR_SIZE
Size of a color in bytes.
Definition: gls_vertex_array.h:63
static const GLuint VERT_SIZE
Size of a vertex in bytes.
Definition: gls_vertex_array.h:60
unsigned int _nVerts
Definition: gls_vertex_array.h:188
void GetVertex(const unsigned int index, Vector &result)
static const GLuint NORMAL_SIZE
Size of a normal in bytes.
Definition: gls_vertex_array.h:62
void SetTexCoords(const Vector verts[])
void SetTexCoord(const unsigned int index, const Vector &v)
void SetVertex(const unsigned int index, const Vector &v)
unsigned int _colorOffset
Definition: gls_vertex_array.h:187
bool _setup
Definition: gls_vertex_array.h:178
unsigned int _normalOffset
Definition: gls_vertex_array.h:186
unsigned int _vboHandle
Definition: gls_vertex_array.h:176
bool _hasT
Definition: gls_vertex_array.h:180
unsigned int _texOffset
Definition: gls_vertex_array.h:185
void SetColors(const Vertex verts[])
void AllocateBuffer(const unsigned int size)
void MultiDraw(const unsigned int glPrimitive, const unsigned int offset, const unsigned int count, const unsigned int primitiveSize, GlsIndexArray &indexBuffer, IGlsStateManager *stateManager, const bool texture, const bool color, const bool normal)
void Draw(const unsigned int glPrimitive, const unsigned int offset, const unsigned int count, GlsIndexArray &indexBuffer, IGlsStateManager *stateManager, const bool texture, const bool color, const bool normal)
bool _hasN
Definition: gls_vertex_array.h:181
void Bake(IGlsStateManager *stateManager)
void SetVertices(const Vertex verts[])
Definition: gls_state_manager_interface.h:65
Definition: non_copyable.h:46
The disti::DynamicArray class. A templated array of objects capable of dynamically growing.
The Color class: Implements a 4 component RGBA color.
A file for all GL Studio files to include.
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:50
The disti::GlsIndexArray class, for managing index buffers.
The Image class. All textures are converted internally into Images.
Definition: bmpimage.h:46
A base class for objects that are not copyable via the standard C++ copy constructor.
The disti::Vertex class. A class for manipulating 3D vertices.