sandbox
Loading...
Searching...
No Matches
push_handler.hpp
1#ifndef LIBSBX_GRAPHICS_BUFFERS_PUSH_HANDLER_HPP_
2#define LIBSBX_GRAPHICS_BUFFERS_PUSH_HANDLER_HPP_
3
4#include <cinttypes>
5#include <optional>
6#include <memory>
7#include <concepts>
8
9#include <libsbx/graphics/pipeline/shader.hpp>
10#include <libsbx/graphics/pipeline/pipeline.hpp>
11
12#include <libsbx/graphics/commands/command_buffer.hpp>
13
14namespace sbx::graphics {
15
17
18public:
19
21
22 // push_handler(const std::optional<shader::uniform_block>& uniform_block = std::nullopt);
23
24 template<typename Type>
25 auto push(const Type& object, std::size_t size, std::size_t offset) -> void;
26
27 template<typename Type>
28 auto push(const std::string& uniform_name, const Type& object, std::size_t size = 0) -> void;
29
30 // auto update(const std::optional<shader::uniform_block>& uniform_block) -> bool;
31
32 auto bind(command_buffer& command_buffer) -> void;
33
34private:
35
36 std::optional<shader::uniform_block> _uniform_block;
37 std::unique_ptr<std::uint8_t[]> _data;
38 VkPipelineLayout _pipeline_layout;
39
40}; // class push_handler
41
42} // namespace sbx::graphics
43
44#include <libsbx/graphics/buffers/push_handler.ipp>
45
46#endif // LIBSBX_GRAPHICS_BUFFERS_PUSH_HANDLER_HPP_
Definition: command_buffer.hpp:14
Definition: pipeline.hpp:18
Definition: push_handler.hpp:16