candlewick 0.1.0
A renderer
Loading...
Searching...
No Matches
MeshData.h File Reference
#include "Utils.h"
#include "StridedView.h"
#include "../core/errors.h"
#include "../core/MeshLayout.h"
#include "../core/MaterialUniform.h"
#include "../core/Tags.h"
#include <span>
#include <SDL3/SDL_assert.h>
#include <SDL3/SDL_gpu.h>

Go to the source code of this file.

Classes

struct  candlewick::MeshDataBase< Derived >
 
class  candlewick::MeshData
 A class to store type-erased vertex data and index data. More...
 

Namespaces

namespace  candlewick
 

Functions

Mesh candlewick::createMesh (const Device &device, const MeshData &meshData, bool upload=false)
 Convert MeshData to a GPU Mesh object. This creates the required vertex buffer and index buffer (if required).
 
Mesh candlewick::createMesh (const Device &device, const MeshData &meshData, SDL_GPUBuffer *vertexBuffer, SDL_GPUBuffer *indexBuffer)
 Create a Mesh object from given mesh data, as a view into existing vertex and index buffers.
 
Mesh candlewick::createMeshFromBatch (const Device &device, std::span< const MeshData > meshDatas, bool upload)
 Create a Mesh from a batch of MeshData.
 
void candlewick::uploadMeshToDevice (const Device &device, const MeshView &meshView, const MeshData &meshData)
 Upload the contents of a single, individual mesh to the GPU device.
 
void candlewick::uploadMeshToDevice (const Device &device, const Mesh &mesh, const MeshData &meshData)
 Upload the contents of a single, individual mesh to the GPU device.
 
std::vector< PbrMaterialcandlewick::extractMaterials (std::span< const MeshData > meshDatas)