How to apply rotation to vertices?

Ok so I’ve got my model loaded by using index buffers. The only way I can think of to rotate it though is to apply a rotation matrix to every vertex, but I couldn’t find how to do that from the documentation. Also I would think there is a better way to rotate the object if I am using index buffers. Here is my code from the display method but it doesn’t rotate the cube I loaded though:

	public void display(final GLAutoDrawable drawable)
	{
		gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
		gl.glLoadIdentity();

		glu.gluLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0);

		gl.glVertexPointer(3, GL.GL_FLOAT, 0, vaVertices);
		gl.glDrawElements(GL.GL_TRIANGLES, m_Indices.length, GL.GL_UNSIGNED_INT, vaIndices);
		
		gl.glRotated(m_quad_angle, 1, 0, 0);
		gl.glRotated(m_quad_angle, 0, 1, 0);
		
		if( (++m_quad_angle) > 360.0 )
			m_quad_angle = 0.0;
	}

If you can please show me how to apply a matrix transformation besides glRotated or glTranslated to a vertex (I don’t think these two functions can be used for what I need), if there is no better way to rotate using something like glRotateElements.

OpenGL is a state machine.

So first you setup the matrices, then you draw the triangles.

You applied the rotation after drawing.