candlewick 0.10.0
A tiny cross-platform renderer based on SDL3
Loading...
Searching...
No Matches
DepthViz.h
Go to the documentation of this file.
1#pragma once
2
4#include "../Camera.h"
5#include <SDL3/SDL_gpu.h>
6
7namespace candlewick {
8
17 SDL_GPUTexture *depthTexture;
18 SDL_GPUSampler *sampler;
20
21 static DepthDebugPass create(const RenderContext &renderer,
22 SDL_GPUTexture *depthTexture);
23
24 void release(SDL_GPUDevice *device);
25};
26
27inline void DepthDebugPass::release(SDL_GPUDevice *device) {
28 if (sampler) {
29 SDL_ReleaseGPUSampler(device, sampler);
30 sampler = NULL;
31 }
32 pipeline.release();
33}
34
35void renderDepthDebug(const RenderContext &renderer, CommandBuffer &cmdBuf,
36 const DepthDebugPass &pass,
37 const DepthDebugPass::Options &opts);
38
39} // namespace candlewick
Definition CommandBuffer.h:16
Class representing a graphics pipeline.
Definition GraphicsPipeline.h:15
Definition Camera.h:8
CameraProjection
Definition Camera.h:16
@ PERSPECTIVE
Definition Camera.h:16
void renderDepthDebug(const RenderContext &renderer, CommandBuffer &cmdBuf, const DepthDebugPass &pass, const DepthDebugPass::Options &opts)
constexpr NoInitT NoInit
Definition Tags.h:9
Definition DepthViz.h:11
float far
Definition DepthViz.h:14
VizStyle mode
Definition DepthViz.h:12
CameraProjection cam_proj
Definition DepthViz.h:15
float near
Definition DepthViz.h:13
Definition DepthViz.h:9
SDL_GPUTexture * depthTexture
Definition DepthViz.h:17
SDL_GPUSampler * sampler
Definition DepthViz.h:18
VizStyle
Definition DepthViz.h:10
@ VIZ_GRAYSCALE
Definition DepthViz.h:10
@ VIZ_HEATMAP
Definition DepthViz.h:10
void release(SDL_GPUDevice *device)
Definition DepthViz.h:27
static DepthDebugPass create(const RenderContext &renderer, SDL_GPUTexture *depthTexture)
GraphicsPipeline pipeline
Definition DepthViz.h:19
The RenderContext class provides a rendering context for a graphical application.
Definition RenderContext.h:36