Add texture utilities

This commit is contained in:
2024-01-10 00:00:19 +00:00
parent 754454c366
commit 9415786adc
2 changed files with 42 additions and 2 deletions

View File

@@ -47,6 +47,12 @@ bool add_event_listener(window_t *wnd, void *obj, event_listener_t listener);
bool add_renderer_func(window_t *wnd, void *obj, render_func_t func);
void fill_rect(const window_t *wnd, const render_rect_t *rect, colour_t colour);
void draw_rect(const window_t *wnd, const render_rect_t *rect, colour_t colour);
SDL_Texture *load_texture(const window_t *wnd, const char *path);
void unload_texture(SDL_Texture *texture);
void get_texture_size(SDL_Texture *texture, i32 *w, i32 *h);
void render_texture(const window_t *wnd, SDL_Texture *texture,
const render_rect_t *src_rect,
const render_rect_t *dst_rect);
bool aabb(u64 x, u64 y, const render_rect_t *rect);
#endif // !WINDOW_H