I am currently drawing a shape using the following code;
GLfloat vertex = // vertex points
glLineWidth(2);
glEnableClientState(GL_VERTEX_ARRAY);
glColor4f(1.0, 0.0, 0.0, 1.0);
glVertexPointer(2, GL_FLOAT, 0, vertex);
glDrawArrays(GL_LINE_STRIP, 0, vertex_size);
glDisableClientState(GL_VERTEX_ARRAY);
The shape I draw closes itself, is it possible to fill this shape with a (radial) gradient? If so, how to go about doing this?