please tell me what is wrong with the following algorithm.i am trying to draw a triangle on the screen using the 3 vertices of the array…
GLfloat vertices[]={10,0,20,0,20,10,20,20,10,20,0,20,0,10};
GLubyte coord[]={1,2,3};
void RenderScene(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0f,0.0f,0.0f);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2,GL_FLOAT,0,vertices);
glDrawElements(GL_TRIANGLES,3,GL_UNSIGNED_BYTE,coord);
glutSwapBuffers();
}