Hello,
I tried to create something similar to the HSV Color Model, but I failed and I hope you can help me with that. I am using GLUT and math.h.
Currently I have this:
KreisList = glGenLists(1);
glNewList(KreisList, GL_COMPILE);
glBegin(GL_TRIANGLE_FAN);
glColor3f(1, 1, 1);
glVertex2f(0, 0);
for (int i = 0; i < 360; i++) {
if (i > 170 && i < 190) {
glColor3f(0, 1, 1);
glVertex2f(cos(i * 2 * PI / 360), sin(i * 2 * PI / 360));
glColor3f(1, 1, 1);
}
else if (i > 189 && i < 270) {
glColor3f(0, 0, 1);
glVertex2f(cos(i * 2 * PI / 360), sin(i * 2 * PI / 360));
glColor3f(1, 1, 1);
}
else {
glColor3f(1, 0, 0);
glVertex2f(cos(i * 2 * PI / 360), sin(i * 2 * PI / 360));
glColor3f(1, 1, 1);
}
}
glColor3f(1, 0,0);
glVertex2f(cos(1 * 2 * PI / 360), sin(1 * 2 * PI / 360));
glEnd();
glEndList();
}
And yes I am using Old OpenGL.
QuesterDesura