#pragma once #include #include #include #include "cbt/opengl/buffer.hpp" #include "cbt/opengl/texture.hpp" namespace cbt::opengl { struct descriptor_binding { GLuint texture_unit = 0; std::optional tex; std::optional buf; }; class descriptor_set { public: descriptor_set(); auto add_texture(texture tex, GLuint unit = 0) -> void; auto add_buffer(buffer buf, GLuint unit = 0) -> void; auto bind_all() -> void; auto count() const -> size_t; private: std::vector m_bindings; }; }