From b2fdd29e4965b096e285a17162b268710077ea04 Mon Sep 17 00:00:00 2001 From: realtradam Date: Fri, 24 Mar 2023 03:18:42 -0400 Subject: texture rendering prototype --- include/rodeo.h | 21 ++++++++++++++++++++- include/rodeo_types.h | 10 ++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/rodeo.h b/include/rodeo.h index c261cc7..8b38826 100644 --- a/include/rodeo.h +++ b/include/rodeo.h @@ -1,5 +1,6 @@ -// public internal +// -- internal -- +// public #include "rodeo_types.h" // system @@ -102,6 +103,24 @@ rodeo_rectangle_draw( rodeo_rgba_t color ); +//rodeo_texture_2d_t* +//rodeo_texture2D_create( +// uint32_t width, +// uint32_t height, +// char *memory +//); + +//rodeo_texture_2d_p +//rodeo_texture_2d_create_default(void); + +void +rodeo_texture2D_draw( + rodeo_rectangle_t source, + rodeo_rectangle_t destination, + rodeo_rgba_t color, + rodeo_texture_2d_p texture +); + /// --- String --- rodeo_string_t diff --git a/include/rodeo_types.h b/include/rodeo_types.h index 37e87eb..a0d3d4e 100644 --- a/include/rodeo_types.h +++ b/include/rodeo_types.h @@ -20,6 +20,8 @@ typedef struct float y; float z; uint32_t abgr; + float tex_x; + float tex_y; } rodeo_vertex_t; @@ -36,6 +38,12 @@ typedef struct } rodeo_rectangle_t; +typedef struct +{ + uint8_t fill_this_out; +} +rodeo_texture_2d_t; + /// --- String --- // taken from STC library @@ -61,3 +69,5 @@ rodeo_loglevel_t; typedef void (*rodeo_log_function)(rodeo_string_t text); + +typedef rodeo_texture_2d_t* rodeo_texture_2d_p; -- cgit v1.2.3