Hi!
Somehow I am not able to use ClearColor with transparency while primitives make no problems in this context so far. Here is some example:
void display()
{
glClearColor(1,0,0,1);
glClear(GL_COLOR_BUFFER_BIT);
glClearColor(0,1,0,0);
glClear(GL_COLOR_BUFFER_BIT);
glPointSize(20);
glColor4d(1,1,1,0.5);
glBegin(GL_POINTS);
glVertex2d(0,0);
glEnd();
glFlush();
}
In the main function I used
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
to enable transparency. Now this code yields a green window with an opaque white square. But the alpha value of the green ClearColor call is 0, so the window should stay red.
Thanks for help!