Lets say that i have the following array :
float QuadVertices[4 * 2];
float QuadNormals[4 * 2];
Which i fill this way :
//Fill vertices for a 2d quad
Renderer->FillVertices(QuadVertices,GL_QUADS,x,y,width,height);
Now at this point everything is ok i can render a quad , texture it , stretch it and all that.
But now i want to calculate the normals of the quad :
for (int i = 0; i < 8;i++)
{
QuadNormals[i] = ??
}
BUT i can't figure out how on earth i am supposed to calculate the normals of a simple 2d vertice array that contains either 4vertices of GL_QUADS or 6vertices of GL_TRIANGLES....
glEnable(GL_NORMALIZE)
:) – Ovi