Reputation: 339
So it's my first time working with OpenGL library and so far I have this code:
glColor3f(1, 0.1, 0.1);
glBegin(GL_QUADS);
glVertex2f(1.0, 1.0);
glVertex2f(0.3, 0.7);
glVertex2f(0.55, 0.45);
glVertex2f(1.0, 0.45);
glEnd();
It is drawing an empty "form" only with red edges, I want it filled with color inside as well.
Upvotes: 1
Views: 4672
Reputation: 4265
The command you are looking for is
glPolygonMode(GL_FRONT, GL_FILL);
See https://www.opengl.org/sdk/docs/man2/xhtml/glPolygonMode.xml
Upvotes: 4