8#include <entt/entity/registry.hpp>
9#include <SDL3/SDL_gpu.h>
15 SDL_GPUGraphicsPipeline *
20 const Float4 &color = 0x40FF00CC_rgbaf);
23 const Camera &camera,
const AABB &aabb,
24 const Float4 &color = 0x00BFFFff_rgbaf);
27 const Camera &camera,
const coal::OBB &obb,
28 const Float4 &color = 0x00BFFFff_rgbaf);
42 std::variant<AABB, coal::OBB>
bounds;
49 SDL_GPUGraphicsPipeline *pipeline;
50 entt::registry &_registry;
56 entt::registry &
registry() {
return _registry; }
57 const entt::registry &
registry()
const {
return _registry; }
59 std::tuple<entt::entity, DebugFrustumComponent &>
64 return {entity, item};
67 template <
typename BoundsType>
68 std::tuple<entt::entity, DebugBoundsComponent &>
72 return {entity, item};
79 SDL_ReleaseGPUGraphicsPipeline(device, pipeline);
Definition CommandBuffer.h:17
std::tuple< entt::entity, DebugFrustumComponent & > addFrustum(const Camera &otherCam, Float4 color=0x00BFFFff_rgbaf)
Definition Frustum.h:60
FrustumBoundsDebugSystem(entt::registry ®istry, const RenderContext &renderer)
~FrustumBoundsDebugSystem()
Definition Frustum.h:82
std::tuple< entt::entity, DebugBoundsComponent & > addBounds(const BoundsType &bounds)
Definition Frustum.h:69
void render(CommandBuffer &cmdBuf, const Camera &camera)
const entt::registry & registry() const
Definition Frustum.h:57
void release() noexcept
Definition Frustum.h:77
entt::registry & registry()
Definition Frustum.h:56
void renderFrustum(CommandBuffer &cmdBuf, SDL_GPURenderPass *render_pass, const Camera &mainCamera, const Camera &otherCam, const Float4 &color=0x40FF00CC_rgbaf)
void renderOBB(CommandBuffer &cmdBuf, SDL_GPURenderPass *render_pass, const Camera &camera, const coal::OBB &obb, const Float4 &color=0x00BFFFff_rgbaf)
SDL_GPUGraphicsPipeline * createFrustumDebugPipeline(const RenderContext &renderer)
void renderAABB(CommandBuffer &cmdBuf, SDL_GPURenderPass *render_pass, const Camera &camera, const AABB &aabb, const Float4 &color=0x00BFFFff_rgbaf)
Eigen::Vector3f Float3
Definition math_types.h:8
Eigen::Vector4f Float4
Definition math_types.h:9
Eigen::Matrix< float, 4, 1, Eigen::DontAlign > GpuVec4
Definition math_types.h:19
Eigen::Matrix4f Mat4f
Definition math_types.h:11
The main way of using a camera to render things.
Definition Camera.h:19
GpuVec4 color
Definition Frustum.h:43
std::variant< AABB, coal::OBB > bounds
Definition Frustum.h:42
Camera const * otherCam
Definition Frustum.h:37
GpuVec4 color
Definition Frustum.h:38
RAII wrapper for SDL_GPUDevice.
Definition Device.h:17
The RenderContext class provides a rendering context for a graphical application.
Definition RenderContext.h:20