Loading...
Searching...
No Matches
VertexBuffer.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
Abstract base class for objects that can be drawn to a render target.
Definition Drawable.hpp:44
Base class for all render targets (window, texture, ...)
Definition RenderTarget.hpp:63
PrimitiveType getPrimitiveType() const
Get the type of primitives drawn by the vertex buffer.
static void bind(const VertexBuffer *vertexBuffer)
Bind a vertex buffer for rendering.
VertexBuffer(PrimitiveType type, Usage usage)
Construct a VertexBuffer with a specific PrimitiveType and usage specifier.
unsigned int getNativeHandle() const
Get the underlying OpenGL handle of the vertex buffer.
VertexBuffer(PrimitiveType type)
Construct a VertexBuffer with a specific PrimitiveType
bool update(const VertexBuffer &vertexBuffer)
Copy the contents of another buffer into this buffer.
static bool isAvailable()
Tell whether or not the system supports vertex buffers.
void setPrimitiveType(PrimitiveType type)
Set the type of primitives to draw.
bool update(const Vertex *vertices)
Update the whole buffer from an array of vertices.
bool update(const Vertex *vertices, std::size_t vertexCount, unsigned int offset)
Update a part of the buffer from an array of vertices.
VertexBuffer & operator=(const VertexBuffer &right)
Overload of assignment operator.
VertexBuffer(Usage usage)
Construct a VertexBuffer with a specific usage specifier.
void swap(VertexBuffer &right) noexcept
Swap the contents of this vertex buffer with those of another.
Definition AudioResource.hpp:36
void swap(Texture &left, Texture &right) noexcept
Swap the contents of one texture with those of another.