candlewick 0.1.0
A renderer
|
Functions | |
void | bindMesh (SDL_GPURenderPass *pass, const Mesh &mesh) |
Bind a Mesh object. | |
void | bindMeshView (SDL_GPURenderPass *pass, const MeshView &view) |
Bind a MeshView object. | |
void | drawViews (SDL_GPURenderPass *pass, std::span< const MeshView > meshViews, Uint32 numInstances=1) |
Render a collection of MeshView. This collection must satisfy the invariant that they all have the same parent Mesh object, which allows batching draw calls like this without having to rebind the Mesh. | |
void | draw (SDL_GPURenderPass *pass, const Mesh &mesh, Uint32 numInstances=1) |
void | drawView (SDL_GPURenderPass *pass, const MeshView &mesh, Uint32 numInstances=1) |
Draw a MeshView. | |
void | bindVertexSamplers (SDL_GPURenderPass *pass, Uint32 first_slot, std::span< const SDL_GPUTextureSamplerBinding > bindings) |
Bind multiple fragment shader samplers. | |
void | bindVertexSamplers (SDL_GPURenderPass *pass, Uint32 first_slot, std::initializer_list< SDL_GPUTextureSamplerBinding > sampler_bindings) |
Bind multiple fragment shader samplers. This overload exists to enable taking a brace-initialized array. | |
void | bindFragmentSamplers (SDL_GPURenderPass *pass, Uint32 first_slot, std::span< const SDL_GPUTextureSamplerBinding > bindings) |
Bind multiple fragment shader samplers. | |
void | bindFragmentSamplers (SDL_GPURenderPass *pass, Uint32 first_slot, std::initializer_list< SDL_GPUTextureSamplerBinding > sampler_bindings) |
Bind multiple fragment shader samplers. This overload exists to enable taking a brace-initialized array. | |
|
inline |
Bind multiple fragment shader samplers. This overload exists to enable taking a brace-initialized array.
|
inline |
Bind multiple fragment shader samplers.
void candlewick::rend::bindMesh | ( | SDL_GPURenderPass * | pass, |
const Mesh & | mesh ) |
Bind a Mesh object.
void candlewick::rend::bindMeshView | ( | SDL_GPURenderPass * | pass, |
const MeshView & | view ) |
Bind a MeshView object.
|
inline |
Bind multiple fragment shader samplers. This overload exists to enable taking a brace-initialized array.
|
inline |
Bind multiple fragment shader samplers.
|
inline |
Render an individual Mesh as part of a render pass, using a provided first index or vertex offset.
This routine will bind the vertex and index buffer. Prefer one of the other routines to e.g. batch draw calls that use the same buffer bindings.
pass | The GPU render pass |
mesh | The Mesh to draw. |
void candlewick::rend::drawView | ( | SDL_GPURenderPass * | pass, |
const MeshView & | mesh, | ||
Uint32 | numInstances = 1 ) |
Draw a MeshView.
pass | The GPU render pass. |
mesh | MeshView object to be drawn. |
void candlewick::rend::drawViews | ( | SDL_GPURenderPass * | pass, |
std::span< const MeshView > | meshViews, | ||
Uint32 | numInstances = 1 ) |
Render a collection of MeshView. This collection must satisfy the invariant that they all have the same parent Mesh object, which allows batching draw calls like this without having to rebind the Mesh.
pass | The GPU render pass |
meshViews | Collection of MeshView objects with the same parent Mesh. |