mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
adding multiple font support
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/03/08 02:24:58 by maldavid #+# #+# */
|
||||
/* Updated: 2023/12/08 19:10:09 by kbz_8 ### ########.fr */
|
||||
/* Updated: 2023/12/14 16:28:07 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -76,16 +76,4 @@ namespace mlx
|
||||
};
|
||||
}
|
||||
|
||||
namespace std
|
||||
{
|
||||
template <>
|
||||
struct hash<mlx::TextureRenderData>
|
||||
{
|
||||
size_t operator()(const mlx::TextureRenderData& td) const noexcept
|
||||
{
|
||||
return std::hash<mlx::Texture*>()(td.texture) + std::hash<int>()(td.x) + std::hash<int>()(td.y);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/07 16:40:09 by maldavid #+# #+# */
|
||||
/* Updated: 2023/11/14 05:36:46 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/12/14 16:39:54 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace mlx
|
||||
}
|
||||
}
|
||||
|
||||
void TextureAtlas::render(Renderer& renderer, int x, int y, uint32_t ibo_size)
|
||||
void TextureAtlas::render(Renderer& renderer, int x, int y, uint32_t ibo_size) const
|
||||
{
|
||||
auto cmd = renderer.getActiveCmdBuffer().get();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/07 16:36:33 by maldavid #+# #+# */
|
||||
/* Updated: 2023/12/08 19:10:22 by kbz_8 ### ########.fr */
|
||||
/* Updated: 2023/12/14 17:12:54 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -26,12 +26,12 @@ namespace mlx
|
||||
TextureAtlas() = default;
|
||||
|
||||
void create(uint8_t* pixels, uint32_t width, uint32_t height, VkFormat format, const char* name, bool dedicated_memory = false);
|
||||
void render(class Renderer& renderer, int x, int y, uint32_t ibo_size);
|
||||
void render(class Renderer& renderer, int x, int y, uint32_t ibo_size) const;
|
||||
void destroy() noexcept override;
|
||||
|
||||
inline void setDescriptor(DescriptorSet&& set) noexcept { _set = set; }
|
||||
inline VkDescriptorSet getSet() noexcept { return _set.isInit() ? _set.get() : VK_NULL_HANDLE; }
|
||||
inline void updateSet(int binding) noexcept { _set.writeDescriptor(binding, getImageView(), getSampler()); }
|
||||
inline void updateSet(int binding) const noexcept { _set.writeDescriptor(binding, getImageView(), getSampler()); }
|
||||
|
||||
~TextureAtlas() = default;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/01/25 11:54:21 by maldavid #+# #+# */
|
||||
/* Updated: 2023/12/08 19:10:38 by kbz_8 ### ########.fr */
|
||||
/* Updated: 2023/12/14 16:44:40 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -50,10 +50,10 @@ namespace mlx
|
||||
|
||||
inline VkImage get() noexcept { return _image; }
|
||||
inline VkImage operator()() noexcept { return _image; }
|
||||
inline VkImageView getImageView() noexcept { return _image_view; }
|
||||
inline VkFormat getFormat() noexcept { return _format; }
|
||||
inline VkImageTiling getTiling() noexcept { return _tiling; }
|
||||
inline VkSampler getSampler() noexcept { return _sampler; }
|
||||
inline VkImageView getImageView() const noexcept { return _image_view; }
|
||||
inline VkFormat getFormat() const noexcept { return _format; }
|
||||
inline VkImageTiling getTiling() const noexcept { return _tiling; }
|
||||
inline VkSampler getSampler() const noexcept { return _sampler; }
|
||||
inline uint32_t getWidth() const noexcept { return _width; }
|
||||
inline uint32_t getHeight() const noexcept { return _height; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user