54 lines
1.8 KiB
C
54 lines
1.8 KiB
C
#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);
|
|
|
|
int shimatta_opengl_texture_set_data(ShimattaOpenglTexture *texture, unsigned int width, unsigned int height,
|
|
GLenum format, void *buffer);
|
|
|
|
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
|
|
|
|
#endif /* _SHIMATTA_OPENGL_TEXTURE_H_ */
|