Monday, February 07, 2005

Anti-Aliasing

To enable Anti-Aliasing:

(1) Enable blending
glEnable(GL_BLEND);

(2) Set the blending function to be GL_ONE_MINUS_SRC_ALPHA
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

(3) Set the blend equation to GL_FUNC_ADD
glBlendEquation(GL_FUNC_ADD);

(4) Call the antialis functions
glEnable(GL_POINT_SMOOTH);
glEnable(GL_LINE_SMOOTH);
glEnable(GL_POLYGON_SMOOTH);




0 Comments:

Post a Comment

<< Home