Implement 2d texture

This commit is contained in:
2020-07-10 21:36:02 +02:00
parent 74fd10883c
commit c4291dcc20
2 changed files with 271 additions and 60 deletions

View File

@@ -23,22 +23,30 @@ int shimatta_opengl_texture_use_in_slot(ShimattaOpenglTexture *texture, unsigned
ShimattaOpenglTexture *shimatta_opengl_texture_new(void);
void shimatta_opengl_texture_set_filter(ShimattaOpenglTexture *texture, int filter_s, int filter_t);
void shimatta_opengl_texture_set_wrap(ShimattaOpenglTexture *texture, int wrap_s, int wrap_t);
void shimatta_opengl_texture_set_gen_mipmap(ShimattaOpenglTexture *texture, gboolean gen_mipmap);
int shimatta_opengl_texture_get_filter(ShimattaOpenglTexture *texture, int *filter_s, int *filter_t);
int shimatta_opengl_texture_get_wrap(ShimattaOpenglTexture *texture, int *wrap_s, int *wrap_t);
gboolean shimatta_opengl_texture_get_gen_mipmap(ShimattaOpenglTexture *texture);
int shimatta_opengl_texture_set_data(ShimattaOpenglTexture *texture, unsigned int width, unsigned int height,
GLenum format, void *buffer);
int shimatta_opengl_texture_set_from_image(ShimattaOpenglTexture *texture, const char *path);
int shimatta_opengl_texture_set_data_from_image(ShimattaOpenglTexture *texture, const char *path);
void shimatta_opengl_texture_set_wrap_s(ShimattaOpenglTexture *self, int wrap_s);
void shimatta_opengl_texture_set_wrap_t(ShimattaOpenglTexture *self, int wrap_t);
void shimatta_opengl_texture_set_min_filter(ShimattaOpenglTexture *self, int min_filter);
void shimatta_opengl_texture_set_mag_filter(ShimattaOpenglTexture *self, int mag_filter);
void shimatta_opengl_texture_set_gen_mipmap(ShimattaOpenglTexture *self, gboolean gen_mipmap);
int shimatta_opengl_texture_get_wrap_s(ShimattaOpenglTexture *self);
int shimatta_opengl_texture_get_wrap_t(ShimattaOpenglTexture *self);
int shimatta_opengl_texture_get_mag_filter(ShimattaOpenglTexture *self);
int shimatta_opengl_texture_get_min_filter(ShimattaOpenglTexture *self);
gboolean shimatta_opengl_texture_get_gen_mipmap(ShimattaOpenglTexture *self);
G_END_DECLS