if (face.hasNormals()) {
Vector3f n1 = m.getNormals().get(face.getNormalIndices()[0] - 1);
glNormal3f(n1.x, n1.y, n1.z);
}
if (face.hasTextureCoordinates()) {
Vector2f t1 = m.getTextureCoordinates().get(face.getTextureCoordinateIndices()[0] - 1);
glTexCoord2f(t1.x, t1.y);
}
Vector3f v1 = m.getVertices().get(face.getVertexIndices()[0] - 1);
glVertex3f(v1.x, v1.y, v1.z);
if (face.hasNormals()) {
Vector3f n2 = m.getNormals().get(face.getNormalIndices()[1] - 1);
glNormal3f(n2.x, n2.y, n2.z);
}
if (face.hasTextureCoordinates()) {
Vector2f t2 = m.getTextureCoordinates().get(face.getTextureCoordinateIndices()[1] - 1);
glTexCoord2f(t2.x, t2.y);
}
Vector3f v2 = m.getVertices().get(face.getVertexIndices()[1] - 1);
glVertex3f(v2.x, v2.y, v2.z);
if (face.hasNormals()) {
Vector3f n3 = m.getNormals().get(face.getNormalIndices()[2] - 1);
glNormal3f(n3.x, n3.y, n3.z);
}
if (face.hasTextureCoordinates()) {
Vector2f t3 = m.getTextureCoordinates().get(face.getTextureCoordinateIndices()[2] - 1);
glTexCoord2f(t3.x, t3.y);
}
Vector3f v3 = m.getVertices().get(face.getVertexIndices()[2] - 1);
glVertex3f(v3.x, v3.y, v3.z);
}