2#ifndef LIBSBX_MODELS_FRUSTUM_CULL_TASK_HPP_
3#define LIBSBX_MODELS_FRUSTUM_CULL_TASK_HPP_
10#include <vulkan/vulkan.h>
12#include <libsbx/math/matrix4x4.hpp>
13#include <libsbx/math/vector4.hpp>
14#include <libsbx/math/plane.hpp>
16#include <libsbx/core/engine.hpp>
18#include <libsbx/graphics/task.hpp>
19#include <libsbx/graphics/graphics_module.hpp>
20#include <libsbx/graphics/commands/command_buffer.hpp>
21#include <libsbx/graphics/buffers/storage_buffer.hpp>
22#include <libsbx/graphics/buffers/push_handler.hpp>
23#include <libsbx/graphics/pipeline/compute_pipeline.hpp>
25namespace sbx::models {
40 auto submit_commands(
const std::vector<VkDrawIndexedIndirectCommand>& commands,
const std::vector<aabb>& bounds) -> void;
48 auto submitted_command_count()
const -> std::uint32_t;
52 template<
typename Type>
54 const auto required_size =
static_cast<std::size_t
>(element_count) *
sizeof(Type);
56 if (buffer.size() < required_size) {
57 buffer.resize(required_size + required_size / 2);
61 template<
typename Type>
63 _resize_buffer<Type>(buffer,
static_cast<std::uint32_t
>(data.size()));
66 buffer.update(data.data(), data.size() *
sizeof(Type));
78 std::uint32_t _command_count{0};
Definition: command_buffer.hpp:15
Definition: compute_pipeline.hpp:18
Definition: push_handler.hpp:18
Definition: resource_storage.hpp:18
Definition: storage_buffer.hpp:17
Definition: vector4.hpp:24
Definition: frustum_culling_task.hpp:32
Definition: frustum_culling_task.hpp:27