fixing new gcc warning in GPU allocator, fixing #55

This commit is contained in:
Kbz-8
2024-03-25 16:18:24 +01:00
parent be52578d37
commit 60d3df7969
7 changed files with 27 additions and 25 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/11 00:09:04 by maldavid #+# #+# */
/* Updated: 2024/02/25 09:00:26 by maldavid ### ########.fr */
/* Updated: 2024/03/25 16:16:48 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -27,12 +27,13 @@ namespace mlx
public:
Text() = default;
void init(std::string text, FontID font, std::vector<Vertex> vbo_data, std::vector<std::uint16_t> ibo_data);
void init(std::string text, FontID font, std::uint32_t color, std::vector<Vertex> vbo_data, std::vector<std::uint16_t> ibo_data);
void bind(class Renderer& renderer) noexcept;
inline FontID getFontInUse() const noexcept { return _font; }
void updateVertexData(int frame, std::vector<Vertex> vbo_data);
inline std::uint32_t getIBOsize() noexcept { return _ibo.getSize(); }
inline const std::string& getText() const { return _text; }
inline std::uint32_t getColor() const noexcept { return _color; }
void destroy() noexcept;
~Text();
@@ -41,6 +42,7 @@ namespace mlx
std::array<D_VBO, MAX_FRAMES_IN_FLIGHT> _vbo;
C_IBO _ibo;
std::string _text;
std::uint32_t _color;
FontID _font = nullfont;
bool _is_init = false;
};