shimatta-opengl/include/shimatta-opengl-texture.h

54 lines
1.8 KiB
C
Raw Permalink Normal View History

#ifndef _SHIMATTA_OPENGL_TEXTURE_H_
#define _SHIMATTA_OPENGL_TEXTURE_H_
#include <glib.h>
#include <glib-object.h>
#include <epoxy/gl.h>
G_BEGIN_DECLS
#define SHIMATTA_TYPE_OPENGL_TEXTURE (shimatta_opengl_texture_get_type())
G_DECLARE_DERIVABLE_TYPE(ShimattaOpenglTexture, shimatta_opengl_texture, SHIMATTA, OPENGL_TEXTURE, GObject);
struct _ShimattaOpenglTextureClass {
GObjectClass super;
void (*use)(ShimattaOpenglTexture *texture);
int (*use_in_slot)(ShimattaOpenglTexture *texture, unsigned int slot);
};
void shimatta_opengl_texture_use(ShimattaOpenglTexture *texture);
int shimatta_opengl_texture_use_in_slot(ShimattaOpenglTexture *texture, unsigned int slot);
ShimattaOpenglTexture *shimatta_opengl_texture_new(void);
2020-07-10 21:36:02 +02:00
int shimatta_opengl_texture_set_data(ShimattaOpenglTexture *texture, unsigned int width, unsigned int height,
GLenum format, void *buffer);
2020-07-10 21:36:02 +02:00
int shimatta_opengl_texture_set_data_from_image(ShimattaOpenglTexture *texture, const char *path);
2020-07-10 21:36:02 +02:00
void shimatta_opengl_texture_set_wrap_s(ShimattaOpenglTexture *self, int wrap_s);
2020-07-10 21:36:02 +02:00
void shimatta_opengl_texture_set_wrap_t(ShimattaOpenglTexture *self, int wrap_t);
2020-07-10 21:36:02 +02:00
void shimatta_opengl_texture_set_min_filter(ShimattaOpenglTexture *self, int min_filter);
2020-07-10 21:36:02 +02:00
void shimatta_opengl_texture_set_mag_filter(ShimattaOpenglTexture *self, int mag_filter);
2020-07-10 21:36:02 +02:00
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);
2020-07-10 21:36:02 +02:00
gboolean shimatta_opengl_texture_get_gen_mipmap(ShimattaOpenglTexture *self);
G_END_DECLS
#endif /* _SHIMATTA_OPENGL_TEXTURE_H_ */