Attention une mise à jour du service Gitlab va être effectuée le mardi 14 décembre entre 13h30 et 14h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 718bb42a authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Minor

parent 94c106b4
...@@ -84,8 +84,6 @@ class Hook_event : public QGLWidget, public Geometry ...@@ -84,8 +84,6 @@ class Hook_event : public QGLWidget, public Geometry
{ {
//Q_OBJECT //Q_OBJECT
protected: protected:
......
...@@ -5,7 +5,16 @@ ...@@ -5,7 +5,16 @@
/* Default constructor*/ /* Default constructor*/
Shader::Shader() : m_vertexID(0), m_fragmentID(0), m_programID(0), Shader::Shader() : m_vertexID(0), m_fragmentID(0), m_programID(0),
m_vertex_code("#version 330 core \n in vec2 in_Vertex; \n in vec3 in_Color; \n uniform mat4 MVP; \n out vec3 color; \n void main(){ \n gl_Position = MVP * vec4(in_Vertex, 0.0, 1.0); \n color = in_Color; \n }"), m_fragment_code("#version 330 core \n in vec3 color; \n out vec4 out_Color; \n void main(){ \n out_Color = vec4(color, 0.5); \n }") m_vertex_code("#version 330 core \n"
"in vec2 in_Vertex; \n"
"in vec3 in_Color; \n"
"uniform mat4 MVP; \n"
"out vec3 color; \n"
"void main(){ \n"
" gl_Position = MVP * vec4(in_Vertex, 0.0, 1.0); \n"
" color = in_Color; \n"
"}"),
m_fragment_code("#version 330 core \n"" in vec3 color; \n"" out vec4 out_Color; \n"" void main(){ \n"" out_Color = vec4(color, 0.5); \n"" }")
{ {
} }
......
...@@ -153,8 +153,8 @@ int Vbo::add(Element_pos x, Element_pos y){ ...@@ -153,8 +153,8 @@ int Vbo::add(Element_pos x, Element_pos y){
void Vbo::config(int glsl){ void Vbo::config(int glsl){
//std::cout << "Configuration du VBO. Nombre de points : "<< _vertex.size()/2 << std::endl; //std::cout << "Configuration du VBO. Nombre de points : "<< _vertex.size()/2 << std::endl;
/* calculate sizes of all dynamic tables*/ /* calculate sizes of all dynamic tables*/
int vertex_size = _vertex.size() * sizeof(Element_pos); int vertex_size = _vertex.size() * sizeof(Element_pos);
int colors_size = _colors.size() * sizeof(Element_col); int colors_size = _colors.size() * sizeof(Element_col);
int texture_size = _texture_coord.size() * sizeof(Element_pos); int texture_size = _texture_coord.size() * sizeof(Element_pos);
int shaded_size; int shaded_size;
Element_pos * vertex = &_vertex[0]; Element_pos * vertex = &_vertex[0];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment