10 const glm::vec3 _id_color,
11 const glm::vec3 _contour_color,
12 glm::mat4 & _modelMatrix,
18 contour_color(_contour_color),
21 position_buffer_handle(0), normal_buffer_handle(0), uv_buffer_handle(0), index_buffer_handle(0)
31 std::cout <<
"Geometry loader for object \"" << this->
id_name <<
"\" invalid!" << std::endl;
50 glBufferData(GL_ARRAY_BUFFER, _vertex_count * 3 *
sizeof(
float), _positions_Ptr, GL_STATIC_DRAW);
51 glBindBuffer(GL_ARRAY_BUFFER,0);
56 glBufferData(GL_ARRAY_BUFFER, _vertex_count * 3 *
sizeof(
float), _normals_Ptr, GL_STATIC_DRAW);
57 glBindBuffer(GL_ARRAY_BUFFER,0);
62 glBufferData(GL_ARRAY_BUFFER, _vertex_count * 2 *
sizeof(
float), _uv_Ptr, GL_STATIC_DRAW);
63 glBindBuffer(GL_ARRAY_BUFFER,0);
68 glBufferData(GL_ELEMENT_ARRAY_BUFFER, _face_ind_count *
sizeof(
unsigned int), _index_Ptr, GL_STATIC_DRAW);
69 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0);
79 std::cout <<
"Failed to set up the shader program for object \"" << this->
id_name <<
"\" !" << std::endl;
121 glDrawElements(GL_TRIANGLES, this->
index_count, GL_UNSIGNED_INT,0);
123 glBindVertexArray(0);
132 if (!_shader_ctrl || (_slot != 1 && _slot != 2))
143 std::cout <<
"Failed to set up the color ID shader program for object \"" << this->
id_name <<
"\" !" << std::endl;
160 if ((_slot != 0 && _slot != 1 && _slot != 2) || !
vao_setup_done[_slot])
173 glDrawElements(GL_TRIANGLES, this->
index_count, GL_UNSIGNED_INT,0);
175 glBindVertexArray(0);