Rotating a vertex vector ?

i’m trying a little code:

// object
static GLubite index[]= { 0, 2, 1,
0, 3, 2};
static GLint vertices[]={ 10, 10,
100, 10,
200, 200,
50, 30 };
// enabling array
glEnableClientState ( GL_VERTEX_ARRAY );
glVertexPointer ( 2, GL_INT, 0, vertices );

// draw figure
glDrawElements ( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, index);

¿ How can I rotate this array ?
, ¿ may be first i have to load it as a matrix and then use glRotate ?, if so ¿ how ?

So, you got to the point where you use vertex arrays, but you still don’t know how to use OpenGL’s transformation functions? If so, you have definitely started in the wrong end.

To rotate a vertex array, put this before glDrawElements.

glRotatef(10, 1, 0, 0);

This will rotate the vertex array 10 degrees about the X-axis.

Well, I think i have long way to become a Carmack. Anyway thanks, It worked.