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

Minor

parent 94c106b4
......@@ -84,8 +84,6 @@ class Hook_event : public QGLWidget, public Geometry
{
//Q_OBJECT
protected:
......
......@@ -5,7 +5,16 @@
/* Default constructor*/
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){
void Vbo::config(int glsl){
//std::cout << "Configuration du VBO. Nombre de points : "<< _vertex.size()/2 << std::endl;
/* calculate sizes of all dynamic tables*/
int vertex_size = _vertex.size() * sizeof(Element_pos);
int colors_size = _colors.size() * sizeof(Element_col);
int vertex_size = _vertex.size() * sizeof(Element_pos);
int colors_size = _colors.size() * sizeof(Element_col);
int texture_size = _texture_coord.size() * sizeof(Element_pos);
int shaded_size;
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