diff --git a/examples/image/main.c b/examples/image/main.c index 59d6546..4d7450a 100644 --- a/examples/image/main.c +++ b/examples/image/main.c @@ -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); diff --git a/src/graphics_common.c b/src/graphics_common.c index e36d264..10b3cb8 100644 --- a/src/graphics_common.c +++ b/src/graphics_common.c @@ -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) { diff --git a/src/util/typedefs.h b/src/util/typedefs.h index 05a4e6f..b4a07ad 100644 --- a/src/util/typedefs.h +++ b/src/util/typedefs.h @@ -75,6 +75,11 @@ typedef union f32 w; f32 h; }; + struct + { + vec2 xy; + vec2 wh; + }; f32 c[4]; } mp_rect;