fixing conflict in gl_canvas

This commit is contained in:
martinfouilleul 2023-07-05 18:07:37 +02:00
commit 1e34c3406f
3 changed files with 9 additions and 9 deletions

View File

@ -79,7 +79,6 @@ int main()
mg_set_color_rgba(0, 1, 1, 1);
mg_clear();
mg_set_color_rgba(1, 1, 1, 1);
/*
mg_matrix_push((mg_mat2x3){0.707, -0.707, 200,
@ -103,6 +102,8 @@ int main()
mg_image_draw(image, (mp_rect){100, 100, 300, 300});
mg_image_draw(image2, (mp_rect){300, 200, 300, 300});
mg_render(surface, canvas);
mg_surface_present(surface);

View File

@ -17,10 +17,8 @@
#endif
#include"stb_image.h"
#if !PLATFORM_ORCA
#define STB_TRUETYPE_IMPLEMENTATION
#include"stb_truetype.h"
#endif
#define STB_TRUETYPE_IMPLEMENTATION
#include"stb_truetype.h"
#include"platform/platform_log.h"
#include"platform/platform_assert.h"
@ -408,8 +406,6 @@ mg_font_data* mg_font_data_from_handle(mg_font handle)
return(data);
}
#if !PLATFORM_ORCA
mg_font mg_font_create_from_memory(u32 size, byte* buffer, u32 rangeCount, unicode_range* ranges)
{
if(!__mgData.init)
@ -602,8 +598,6 @@ void mg_font_destroy(mg_font fontHandle)
mg_handle_recycle(fontHandle.h);
}
}
#endif // !PLATFORM_ORCA
str32 mg_font_get_glyph_indices_from_font_data(mg_font_data* fontData, str32 codePoints, str32 backing)
{

View File

@ -75,6 +75,11 @@ typedef union
f32 w;
f32 h;
};
struct
{
vec2 xy;
vec2 wh;
};
f32 c[4];
} mp_rect;