OpenGL -- GL_LINE_LOOP --
c, colors, geometry, opengl
Solution
A line loop is just an outline.
To fill the middle as well, you want to use `GL_POLYGON`.
Problem
I am using GL_LINE_LOOP to draw a circle in C and openGL! Is it possible for me to fill the circle with colors? If needed, this is the code I'm using: ``` const int circle_points=100; const float cx=50+i, cy=50+x, r=50; const float pi = 3.14159f; int i = 50; glColor3f(1, 1, 1); glBegin(GL_LINE_LOOP); for(i=0;i<circle_points;i++) { const float theta=(2*pi*i)/circle_points; glVertex2f(cx+r*cos(theta),cy+r*sin(theta)); } glEnd(); ```