Is it posible to use normals with indices? If so, how?
say for example i have
std::vector<GLfloat> vertices{
2.0f, 0.0f, -2.0f, 0.0f, 0.0f, -1.0f, 2.0f, 2.0f,
-2.0f, 0.0f, -2.0f, 0.0f, 0.0f, -1.0f, 0.0f, 2.0f,
-2.0f, 0.0f, 2.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f,
2.0f, 0.0f, 2.0f, 0.0f, 0.0f, -1.0f, 2.0f, 0.0f
};
std::vector<GLuint>indices{
0,1,3,
1,2,3
};
I just dont want to declare too many vertices. Using indices is my much preferred method when for example making a cube.
Its just a plane. I just want to visualize normal vectors with the use of geometry shader. Ive been trying to use the normal but still not showing on my scene.