diff --git a/src/DataHandling/Model3D.cpp b/src/DataHandling/Model3D.cpp index b46e711..bc9fafd 100644 --- a/src/DataHandling/Model3D.cpp +++ b/src/DataHandling/Model3D.cpp @@ -53,7 +53,7 @@ void Model3D::draw_model() for (uint32_t i = 0;icoordinates[j]]; + Vec2f& vertex_texture = texture_coordinates[face_texture->coordinates[j]]; glTexCoord2f(vertex_texture.x,vertex_texture.y); } glVertex3f(vertex.x,vertex.y,vertex.z); diff --git a/src/Vectors.h b/src/Vectors.h index db563ab..2991d92 100644 --- a/src/Vectors.h +++ b/src/Vectors.h @@ -150,7 +150,7 @@ struct Vec3 : CoordinatesVector { if (this != &original) { - std::copy(std::begin(original.coordinates), std::end(original.coordinates), std::begin(CoordinatesVector::coordinates)); + std::copy(std::begin(original.coordinates), std::end(original.coordinates), std::begin(CoordinatesVector::coordinates)); } } diff --git a/src/main.cpp b/src/main.cpp index 3195bc4..c36a79c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,6 +21,11 @@ void manage_inputs() { glClearColor(0.5,0,0,1); } + else if (KeyStateManager::is_key_pressed(0x1B)) + { + glutDestroyWindow(glutGetWindow()); + exit(EXIT_SUCCESS); + } else { glClearColor(0,0,0,1);