Open GL ch 9 AntiAliasing Blending Function AntiAliasing
Open. GL 실습 ch 9 Anti-Aliasing
Blending Function 이용 Anti-Aliasing n Blending Function n n 현재 처리중인 원본 컬러값과 프레임 버퍼에 있는 기 존의 컬러값(대상: destination)을 결합하는 방법 gl. Blend. Func (sfactor , dfactor ) n sfactor n n dfactor n n Specifies how the red, green, blue, and alpha source blending factors are computed. Specifies how the red, green, blue, and alpha destination blending factors are computed. 예) gl. Enable(GL_BLEND); //기능 활성화 후에 사용 gl. Blend. Func(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Source and destination scale factors
점과 선의 Anti-Aliasing n n n gl. Enable(GL_POINT_SMOOTH); gl. Enable(GL_LINE_SMOOTH); gl. Hint (target , mode ) n target n n Specifies a symbolic constant indicating the behavior to be controlled. GL_FOG_HINT, GL_LINE_SMOOTH_HINT, GL_PERSPECTIVE_CORRECTION_HINT, GL_POINT_SMOOTH_HINT, and GL_POLYGON_SMOOTH_HINT are accepted. mode n Specifies a symbolic constant indicating the desired behavior. GL_FASTEST, GL_NICEST, and GL_DONT_CARE are accepted.
점과 선의 Anti-Aliasing
실습 n 9_3_antialiasing_실습용. cpp 실행 n n n Aliasing 확인 Blending Function을 이용한 Anti-Aliasing 활성화 시킨 기능을 비활성화 n n n gl. Disable(GL_POINT_SMOOTH); gl. Disable(GL_LINE_SMOOTH); gl. Disable(GL_BLEND);
- Slides: 6