Hi!
How can I achieve that parts of overlapping lines don’t become brighter? I am using antialised lines with blendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA).
Thanks,
steve
Hi!
How can I achieve that parts of overlapping lines don’t become brighter? I am using antialised lines with blendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA).
Thanks,
steve
That’s weird, this code seems to work just fine:
glHint(GL_LINE_SMOOTH_HINT,GL_NICEST);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.5f,0.5f,0.5f);
glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glLineWidth(10.0);
glBegin(GL_LINES);
glVertex2f(-0.5, 0.2);
glVertex2f( 0.5,-0.2);
glVertex2f(-0.2,-0.5);
glVertex2f( 0.2, 0.5);
glEnd();
glLineWidth(1.0);
glDisable(GL_BLEND);
glDisable(GL_LINE_SMOOTH);