Class Rasterizer#

Class Documentation#

class Rasterizer#

Public Functions

Rasterizer()#
Rasterizer(const Rasterizer&) = delete#
Rasterizer &operator=(const Rasterizer&) = delete#
void init(const std::shared_ptr<VulkanDevice> &in_device, VulkanSwapChain *swap_chain, std::span<const vk::DescriptorSetLayout> descriptorSetLayouts, vk::CommandPool &commandPool)#
void shaderHotReload(std::span<const vk::DescriptorSetLayout> descriptor_set_layouts)#
Kataglyphis::Texture &getOffscreenTexture(uint32_t index)#
void setPushConstant(PushConstantRasterizer push_constant)#
void recordCommands(vk::CommandBuffer &commandBuffer, uint32_t image_index, Kataglyphis::Scene *scene, std::span<const vk::DescriptorSet> descriptorSets, const std::optional<FrustumPlanes> &cameraFrustum = std::nullopt)#

cameraFrustum culls meshes whose world-space bounds fall entirely outside the view. Pass std::nullopt to draw everything - and note that the SHADOW pass must do exactly that: geometry behind or beside the camera still casts into view, so culling casters by the camera frustum deletes shadows rather than saving work.

inline unsigned int getMeshesDrawn() const#

Meshes drawn / considered by the most recent recordCommands call. Reset at the start of each call, so a frame that records nothing reports zeros rather than stale counts from the previous frame.

inline unsigned int getMeshesConsidered() const#
void recreateFrameResources(vk::CommandPool commandPool)#
void destroyFramebuffers()#
void cleanUp()#
~Rasterizer()#

Public Static Attributes

static vk::Format OFFSCREEN_FORMAT = vk::Format::eR16G16B16A16Sfloat#