Mercurial > molko
comparison libmlk-core/mlk/core/image.h @ 641:fcd124e513ea
core: reintroduce VFS
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 01 Oct 2023 09:18:01 +0200 |
parents | d307f93d79af |
children |
comparison
equal
deleted
inserted
replaced
640:9850089c9671 | 641:fcd124e513ea |
---|---|
25 */ | 25 */ |
26 | 26 |
27 #include <stddef.h> | 27 #include <stddef.h> |
28 | 28 |
29 struct mlk_texture; | 29 struct mlk_texture; |
30 struct mlk_vfs_file; | |
30 | 31 |
31 #if defined(__cplusplus) | 32 #if defined(__cplusplus) |
32 extern "C" { | 33 extern "C" { |
33 #endif | 34 #endif |
34 | 35 |
58 * \return 0 on success or any error code instead | 59 * \return 0 on success or any error code instead |
59 */ | 60 */ |
60 int | 61 int |
61 mlk_image_openmem(struct mlk_texture *texture, const void *data, size_t datasz); | 62 mlk_image_openmem(struct mlk_texture *texture, const void *data, size_t datasz); |
62 | 63 |
64 /** | |
65 * Open an image from a virtual file system. | |
66 * | |
67 * The VFS file can be discarded after loading the image. | |
68 * | |
69 * \pre texture != NULL | |
70 * \pre file != NULL | |
71 * \param texture the texture to initialize | |
72 * \param file the VFS file | |
73 * \return 0 on success or -1 on error | |
74 */ | |
75 int | |
76 mlk_image_openvfs(struct mlk_texture *texture, struct mlk_vfs_file *file); | |
77 | |
63 #if defined(__cplusplus) | 78 #if defined(__cplusplus) |
64 } | 79 } |
65 #endif | 80 #endif |
66 | 81 |
67 #endif /* !MLK_CORE_IMAGE_H */ | 82 #endif /* !MLK_CORE_IMAGE_H */ |