gKit2 light
texture.h
Go to the documentation of this file.
1 
2 #ifndef _TEXTURE_H
3 #define _TEXTURE_H
4 
5 #include "glcore.h"
6 #include "image.h"
7 #include "image_io.h"
8 
9 
12 
15 
16 
19 GLuint make_texture( const int unit, const Image& im, const GLenum texel_type= GL_RGBA32F );
20 
23 GLuint make_texture( const int unit, const ImageData& im, const GLenum texel_type= GL_RGBA );
24 
27 GLuint read_texture( const int unit, const char *filename, const GLenum texel_type= GL_RGBA );
28 
30 int miplevels( const int width, const int height );
31 
33 int screenshot( const char *filename );
34 
36 int screenshot( const char *prefix, const int id );
37 
66 int capture( const char *prefix );
67 
69 GLuint make_texture( const int unit, const int width, const int height, const GLenum texel_type, const GLenum data_format= GL_RGBA, const GLenum data_type= GL_UNSIGNED_BYTE );
70 
72 GLuint make_flat_texture( const int unit, const int width, const int height, const GLenum texel_type, const GLenum data_format= GL_RGBA, const GLenum data_type= GL_UNSIGNED_BYTE );
73 
74 // utilitaires.
76 GLuint make_depth_texture( const int unit, const int width, const int height, const GLenum texel_type= GL_DEPTH_COMPONENT );
78 GLuint make_uint_texture( const int unit, const int width, const int height, const GLenum texel_type= GL_R32UI );
80 GLuint make_float_texture( const int unit, const int width, const int height, const GLenum texel_type= GL_R32F );
82 GLuint make_vec2_texture( const int unit, const int width, const int height, const GLenum texel_type= GL_RG32F );
84 GLuint make_vec3_texture( const int unit, const int width, const int height, const GLenum texel_type= GL_RGB32F );
86 GLuint make_vec4_texture( const int unit, const int width, const int height, const GLenum texel_type= GL_RGBA32F );
87 
89 #endif
representation d'une image.
Definition: image.h:21
GLuint make_vec2_texture(const int unit, const int width, const int height, const GLenum texel_type=GL_RG32F)
creation de textures pour stocker des donnees (autres qu'une couleur).
Definition: texture.cpp:177
int capture(const char *prefix)
Definition: texture.cpp:221
GLuint make_texture(const int unit, const Image &im, const GLenum texel_type=GL_RGBA32F)
Definition: texture.cpp:82
int screenshot(const char *filename)
enregistre le contenu de la fenetre dans un fichier. doit etre de type .png / .bmp
Definition: texture.cpp:194
GLuint make_vec3_texture(const int unit, const int width, const int height, const GLenum texel_type=GL_RGB32F)
creation de textures pour stocker des donnees (autres qu'une couleur).
Definition: texture.cpp:182
GLuint make_float_texture(const int unit, const int width, const int height, const GLenum texel_type=GL_R32F)
creation de textures pour stocker des donnees (autres qu'une couleur).
Definition: texture.cpp:172
GLuint make_vec4_texture(const int unit, const int width, const int height, const GLenum texel_type=GL_RGBA32F)
creation de textures pour stocker des donnees (autres qu'une couleur).
Definition: texture.cpp:187
GLuint read_texture(const int unit, const char *filename, const GLenum texel_type=GL_RGBA)
Definition: texture.cpp:154
int miplevels(const int width, const int height)
renvoie le nombre de mipmap d'une image width x height.
Definition: texture.cpp:10
GLuint make_flat_texture(const int unit, const int width, const int height, const GLenum texel_type, const GLenum data_format=GL_RGBA, const GLenum data_type=GL_UNSIGNED_BYTE)
creation de textures non filtrables / 1 mipmap
Definition: texture.cpp:49
GLuint make_uint_texture(const int unit, const int width, const int height, const GLenum texel_type=GL_R32UI)
creation de textures pour stocker des donnees (autres qu'une couleur).
Definition: texture.cpp:167
GLuint make_depth_texture(const int unit, const int width, const int height, const GLenum texel_type=GL_DEPTH_COMPONENT)
creation de textures pour stocker des donnees (autres qu'une couleur).
Definition: texture.cpp:162
stockage temporaire des donnees d'une image.
Definition: image_io.h:38