Loading...
Searching...
No Matches
VertexBuffer.h
Go to the documentation of this file.
1
2//
3// SFML - Simple and Fast Multimedia Library
4// Copyright (C) 2007-2024 Laurent Gomila (laurent@sfml-dev.org)
5//
6// This software is provided 'as-is', without any express or implied warranty.
7// In no event will the authors be held liable for any damages arising from the use of this software.
8//
9// Permission is granted to anyone to use this software for any purpose,
10// including commercial applications, and to alter it and redistribute it freely,
11// subject to the following restrictions:
12//
13// 1. The origin of this software must not be misrepresented;
14// you must not claim that you wrote the original software.
15// If you use this software in a product, an acknowledgment
16// in the product documentation would be appreciated but is not required.
17//
18// 2. Altered source versions must be plainly marked as such,
19// and must not be misrepresented as being the original software.
20//
21// 3. This notice may not be removed or altered from any source distribution.
22//
24
25#ifndef SFML_VERTEXBUFFER_H
26#define SFML_VERTEXBUFFER_H
27
29// Headers
33#include <SFML/Graphics/Types.h>
35#include <stddef.h>
36
37
55
72
82
90
100
132CSFML_GRAPHICS_API sfBool sfVertexBuffer_update(sfVertexBuffer* vertexBuffer, const sfVertex* vertices, unsigned int vertexCount, unsigned int offset);
133
144
153
165
179
189
207
217
240
252
253
254#endif // SFML_VERTEXBUFFER_H
int sfBool
Definition Config.h:153
#define CSFML_GRAPHICS_API
struct sfVertexBuffer sfVertexBuffer
sfPrimitiveType
Types of primitives that a sf::VertexArray can render.
sfBool sfVertexBuffer_updateFromVertexBuffer(sfVertexBuffer *vertexBuffer, const sfVertexBuffer *other)
Copy the contents of another buffer into this buffer.
sfVertexBufferUsage
Usage specifiers.
@ sfVertexBufferStatic
Rarely changing data.
@ sfVertexBufferStream
Constantly changing data.
@ sfVertexBufferDynamic
Occasionally changing data.
void sfVertexBuffer_swap(sfVertexBuffer *left, sfVertexBuffer *right)
Swap the contents of this vertex buffer with those of another.
sfBool sfVertexBuffer_update(sfVertexBuffer *vertexBuffer, const sfVertex *vertices, unsigned int vertexCount, unsigned int offset)
Update a part of the buffer from an array of vertices.
unsigned int sfVertexBuffer_getNativeHandle(sfVertexBuffer *vertexBuffer)
Get the underlying OpenGL handle of the vertex buffer.
sfVertexBufferUsage sfVertexBuffer_getUsage(const sfVertexBuffer *vertexBuffer)
Get the usage specifier of this vertex buffer.
void sfVertexBuffer_destroy(sfVertexBuffer *vertexBuffer)
Destroy an existing vertex buffer.
sfVertexBuffer * sfVertexBuffer_create(unsigned int vertexCount, sfPrimitiveType type, sfVertexBufferUsage usage)
Create a new vertex buffer with a specific sfPrimitiveType and usage specifier.
void sfVertexBuffer_bind(const sfVertexBuffer *vertexBuffer)
Bind a vertex buffer for rendering.
sfVertexBuffer * sfVertexBuffer_copy(const sfVertexBuffer *vertexBuffer)
Copy an existing vertex buffer.
void sfVertexBuffer_setPrimitiveType(sfVertexBuffer *vertexBuffer, sfPrimitiveType type)
Set the type of primitives to draw.
sfBool sfVertexBuffer_isAvailable(void)
Tell whether or not the system supports vertex buffers.
void sfVertexBuffer_setUsage(sfVertexBuffer *vertexBuffer, sfVertexBufferUsage usage)
Set the usage specifier of this vertex buffer.
unsigned int sfVertexBuffer_getVertexCount(const sfVertexBuffer *vertexBuffer)
Return the vertex count.
sfPrimitiveType sfVertexBuffer_getPrimitiveType(const sfVertexBuffer *vertexBuffer)
Get the type of primitives drawn by the vertex buffer.
Define a point with color and texture coordinates.
Definition Vertex.h:40