42#ifndef GLS_VERTEX_ARRAY_H
43#define GLS_VERTEX_ARRAY_H
62 static const GLuint
VERT_SIZE =
sizeof( GL_FLOAT ) * 3;
63 static const GLuint
TEX_SIZE =
sizeof( GL_FLOAT ) * 2;
65 static const GLuint
COLOR_SIZE =
sizeof( GL_UNSIGNED_BYTE ) * 4;
81 void Setup(
const int nVerts,
const bool hasT,
const bool hasC,
const bool hasN );
137 void Draw(
const unsigned int glPrimitive,
IGlsStateManager* stateManager,
const bool texture,
const bool color,
const bool normal );
152 const bool texture,
const bool color,
const bool normal );
167 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:54
Definition: gls_vertex_array.h:60
virtual ~GlsVertexArray()
static const GLuint TEX_SIZE
Size of a texture coordinate in bytes.
Definition: gls_vertex_array.h:63
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:173
bool _hasC
Definition: gls_vertex_array.h:178
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:170
unsigned int _componentSize
Definition: gls_vertex_array.h:180
static const GLuint COLOR_SIZE
Size of a color in bytes.
Definition: gls_vertex_array.h:65
static const GLuint VERT_SIZE
Size of a vertex in bytes.
Definition: gls_vertex_array.h:62
unsigned int _nVerts
Definition: gls_vertex_array.h:184
static const GLuint NORMAL_SIZE
Size of a normal in bytes.
Definition: gls_vertex_array.h:64
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:183
bool _setup
Definition: gls_vertex_array.h:174
unsigned int _normalOffset
Definition: gls_vertex_array.h:182
unsigned int _vboHandle
Definition: gls_vertex_array.h:172
bool _hasT
Definition: gls_vertex_array.h:176
unsigned int _texOffset
Definition: gls_vertex_array.h:181
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:177
void Bake(IGlsStateManager *stateManager)
void SetVertices(const Vertex verts[])
Definition: gls_state_manager_interface.h:69
Definition: non_copyable.h:47
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.
The disti::GlsIndexArray class, for managing index buffers.
The Image class. All textures are converted internally into Images.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
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.