I am plotting points to the window and based on the pixel position I want to map a range of rgb color to it one shade/color per pixel. This is the loop:
glViewport(0.0, 0.0, 600.0, 600.0);
glBegin(GL_POINTS);
float a;
for (int i = 0; i < 256*1024; i++) {
a = fmod((float)i, 255.0f);
glColor3f(a, 0.0, 0.0);
graph[i].x = output.x;
graph[i].y = output.y;
glVertex2f(graph[i].x, graph[i].y);
glClear(GL_COLOR_BUFFER_BIT);
}
glEnd();
glFlush();
this is in side a render function call to glutDisplayFunc(). It just prints all the pixels as red doesn’t shade any of them darker. Is it because its too light of a change.