Add texture (not yet fully implemented) and fix chaning of dispose handlers
This commit is contained in:
45
include/shimatta-opengl-texture.h
Normal file
45
include/shimatta-opengl-texture.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#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_ */
|
7656
include/stb/stb_image.h
Normal file
7656
include/stb/stb_image.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user