46 lines
1.6 KiB
C
46 lines
1.6 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);
|
|
|
|
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);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* _SHIMATTA_OPENGL_TEXTURE_H_ */
|