21#ifndef GF_VERTEX_BUFFER_H
22#define GF_VERTEX_BUFFER_H
27#include "GraphicsApi.h"
28#include "GraphicsHandle.h"
29#include "PrimitiveType.h"
32#ifndef DOXYGEN_SHOULD_SKIP_THIS
44 static void gen(
int n,
unsigned* resources);
45 static void del(
int n,
const unsigned* resources);
134 return m_vbo.isValid();
143 return m_ebo.isValid();
198#ifndef DOXYGEN_SHOULD_SKIP_THIS
Data in the graphics memory.
Definition: VertexBuffer.h:81
bool hasArrayBuffer() const
Check if there is an array buffer.
Definition: VertexBuffer.h:133
VertexBuffer()
Default constructor.
VertexBuffer(const Vertex *vertices, std::size_t count, PrimitiveType type)
Load an array of vertices.
static void bind(const VertexBuffer *buffer)
Binds a vertex buffer.
std::size_t getCount() const
Get the count of vertices or indices.
Definition: VertexBuffer.h:164
std::size_t getVertexSize() const
Get the vertex size in the buffer.
Definition: VertexBuffer.h:151
VertexBuffer(const void *vertices, std::size_t size, std::size_t count, PrimitiveType type)
Load an array of custom vertices.
VertexBuffer(const Vertex *vertices, const uint16_t *indices, std::size_t count, PrimitiveType type)
Load an array of vertices and their indices.
bool hasElementArrayBuffer() const
Check if there is an element array buffer.
Definition: VertexBuffer.h:142
PrimitiveType getPrimitiveType() const
Get the primitive type of the data in the buffer.
Definition: VertexBuffer.h:177
VertexBuffer(const void *vertices, std::size_t size, const uint16_t *indices, std::size_t count, PrimitiveType type)
Load an array of custom vertices and their indices.
GraphicsTag
A tag to represent various GPU resources.
Definition: GraphicsHandle.h:37
PrimitiveType
Kind of primitives to render.
Definition: PrimitiveType.h:43
The namespace for gf classes.
static void del(int n, const unsigned *resources)
static void gen(int n, unsigned *resources)
A trait to handle creation and deletion of GPU resources.
Definition: GraphicsHandle.h:48
A point associated with a color and a texture coordinate.
Definition: Vertex.h:75