Mercurial > molko
diff src/core/texture_p.h @ 94:ed72843a7194
core: simplify font/texture interfaces
Expose the structure to avoid calling functions and heap allocations. While
here remove some useless functions.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 30 Mar 2020 13:34:42 +0200 |
parents | 52792b863ff7 |
children |
line wrap: on
line diff
--- a/src/core/texture_p.h Thu Mar 26 10:28:11 2020 +0100 +++ b/src/core/texture_p.h Mon Mar 30 13:34:42 2020 +0200 @@ -19,13 +19,13 @@ #ifndef MOLKO_TEXTURE_P_H #define MOLKO_TEXTURE_P_H +#include <stdbool.h> + #include <SDL.h> -struct texture { - SDL_Texture *handle; -}; +struct texture; -struct texture * -texture_from_surface(SDL_Surface *surface); +bool +texture_from_surface(struct texture *tex, SDL_Surface *surface); #endif /* !MOLKO_TEXTURE_P_H */