mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 23:23:34 +00:00
adding texture atlas class
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/06 16:24:11 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/07 00:11:25 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/07 17:11:08 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#define __MLX_TEXT_PIPELINE__
|
||||
|
||||
#include <renderer/renderer.h>
|
||||
#include <renderer/images/texture.h>
|
||||
#include <renderer/images/texture_atlas.h>
|
||||
#include <string>
|
||||
#include <stb_truetype.h>
|
||||
#include <cstdint>
|
||||
@@ -26,16 +26,16 @@ namespace mlx
|
||||
public:
|
||||
TextPutPipeline() = default;
|
||||
|
||||
void init(Renderer& renderer) noexcept;
|
||||
|
||||
void init(Renderer* renderer) noexcept;
|
||||
void put(int x, int y, int color, std::string str);
|
||||
void destroy() noexcept;
|
||||
|
||||
~TextPutPipeline() = default;
|
||||
|
||||
private:
|
||||
uint8_t _ttf_buffer[1 << 20];
|
||||
stbtt_bakedchar _cdata[96];
|
||||
Texture _atlas;
|
||||
TextureAtlas _atlas;
|
||||
Renderer* _renderer = nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user