std::vector<float> get_normals(std::vector<unsigned int> &indices, std::vector<float> &vertices)
{
    std::vector<float> normals;
    for (int i = 0; i < indices.size(); i += 3) 
    {
        glm::vec3 v1(vertices[indices[i]*3], vertices[indices[i]*3+1], vertices[indices[i]*3+2]);
        glm::vec3 v2(vertices[indices[i+1]*3], vertices[indices[i+1]*3+1], vertices[indices[i+1]*3+2]);
        glm::vec3 v3(vertices[indices[i+2]*3], vertices[indices[i+2]*3+1], vertices[indices[i+2]*3+2]);

        glm::vec3 normal = glm::normalize(glm::cross(v2 - v1, v3 - v1));

        for (int j = 0; j < 3; j++) 
        {
            normals.push_back(normal.x);
            normals.push_back(normal.y);
            normals.push_back(normal.z);
        }
    }
    return normals;
}