gKit2 light
uniforms.h
Go to the documentation of this file.
1 
2 #ifndef _UNIFORMS_H
3 #define _UNIFORMS_H
4 
5 #include <string>
6 #include <vector>
7 
8 #include "glcore.h"
9 
10 #include "vec.h"
11 #include "mat.h"
12 #include "color.h"
13 
14 
17 
20 
22 void program_uniform( const GLuint program, const char *uniform, const unsigned v );
24 void program_uniform( const GLuint program, const char *uniform, const int v );
26 void program_uniform( const GLuint program, const char *uniform, const float v );
27 
29 void program_uniform( const GLuint program, const char *uniform, const vec2& v );
30 
32 void program_uniform( const GLuint program, const char *uniform, const vec3& v );
34 void program_uniform( const GLuint program, const char *uniform, const Point& v );
36 void program_uniform( const GLuint program, const char *uniform, const Vector& v );
37 
39 void program_uniform( const GLuint program, const char *uniform, const vec4& v );
41 void program_uniform( const GLuint program, const char *uniform, const Color& c );
42 
44 void program_uniform( const GLuint program, const char *uniform, const Transform& v );
45 
47 void program_uniform( const GLuint program, const char *uniform, const std::vector<unsigned>& c );
49 void program_uniform( const GLuint program, const char *uniform, const std::vector<int>& c );
51 void program_uniform( const GLuint program, const char *uniform, const std::vector<float>& c );
53 void program_uniform( const GLuint program, const char *uniform, const std::vector<vec2>& c );
55 void program_uniform( const GLuint program, const char *uniform, const std::vector<vec3>& c );
57 void program_uniform( const GLuint program, const char *uniform, const std::vector<vec4>& c );
59 void program_uniform( const GLuint program, const char *uniform, const std::vector<Color>& c );
61 void program_uniform( const GLuint program, const char *uniform, const std::vector<Transform>& v );
62 
64 void program_use_texture( const GLuint program, const char *uniform, const int unit, const GLuint texture, const GLuint sampler= 0 );
65 
67 #endif
void program_use_texture(const GLuint program, const char *uniform, const int unit, const GLuint texture, const GLuint sampler=0)
configure le pipeline et le shader program pour utiliser une texture, et des parametres de filtrage,...
Definition: uniforms.cpp:198
void program_uniform(const GLuint program, const char *uniform, const unsigned v)
affecte une valeur a un uniform du shader program. uint.
representation d'une couleur (rgba) transparente ou opaque.
Definition: color.h:14
representation d'un point 3d.
Definition: vec.h:21
representation d'une transformation, une matrice 4x4, organisee par ligne / row major.
Definition: mat.h:21
representation d'un vecteur 3d.
Definition: vec.h:59
vecteur generique, utilitaire.
Definition: vec.h:131
vecteur generique, utilitaire.
Definition: vec.h:146
vecteur generique 4d, ou 3d homogene, utilitaire.
Definition: vec.h:168