working on text render pipeline

This commit is contained in:
2023-04-08 04:09:25 +02:00
parent 77e8672754
commit 157a099ed2
11 changed files with 8202 additions and 29 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/07 16:36:33 by maldavid #+# #+# */
/* Updated: 2023/04/07 16:44:43 by maldavid ### ########.fr */
/* Updated: 2023/04/08 00:27:46 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -24,10 +24,12 @@ namespace mlx
public:
TextureAtlas() = default;
void create(uint8_t* pixels, uint32_t width, uint32_t height, VkFormat format, uint32_t render_width, uint32_t rendre_height);
void render(class Renderer& renderer, int x, int y, std::array<glm::vec2, 4> uv);
void create(uint8_t* pixels, uint32_t width, uint32_t height, VkFormat format);
void render(class Renderer& renderer, int x, int y, std::array<glm::vec2, 4> pos, std::array<glm::vec2, 4> uv);
void destroy() noexcept override;
inline void setColor(int color) noexcept { _color = color; }
inline void setDescriptor(DescriptorSet set) noexcept { _set = std::move(set); }
inline VkDescriptorSet getSet() noexcept { return _set.isInit() ? _set.get() : VK_NULL_HANDLE; }
inline void updateSet(int binding) noexcept { _set.writeDescriptor(binding, getImageView(), getSampler()); }
@@ -38,8 +40,7 @@ namespace mlx
VBO _vbo;
C_IBO _ibo;
DescriptorSet _set;
uint32_t _render_width;
uint32_t _render_height;
int _color;
};
}