mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 14:43:34 +00:00
adding stb_truetype
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/02 14:49:49 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/06 16:38:50 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/06 19:01:12 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <platform/window.h>
|
||||
#include <renderer/renderer.h>
|
||||
#include <renderer/pixel_put.h>
|
||||
#include <renderer/text_pipeline.h>
|
||||
#include <utils/non_copyable.h>
|
||||
#include <renderer/images/texture.h>
|
||||
|
||||
|
||||
@@ -6,17 +6,20 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/06 16:41:13 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/06 16:42:10 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/07 00:13:50 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <renderer/text_pipeline.h>
|
||||
|
||||
#define STB_TRUETYPE_IMPLEMENTATION
|
||||
#include <std_truetype.h>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
void TextPutPipeline::init(Renderer& renderer) noexcept
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
void TextPutPipeline::put(int x, int y, int color, std::string str)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/06 16:24:11 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/06 16:41:09 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/07 00:11:25 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#include <renderer/renderer.h>
|
||||
#include <renderer/images/texture.h>
|
||||
#include <string>
|
||||
#include <stb_truetype.h>
|
||||
#include <cstdint>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
@@ -31,7 +33,9 @@ namespace mlx
|
||||
~TextPutPipeline() = default;
|
||||
|
||||
private:
|
||||
|
||||
uint8_t _ttf_buffer[1 << 20];
|
||||
stbtt_bakedchar _cdata[96];
|
||||
Texture _atlas;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user