2013年3月10日 星期日

OpenGL Blend


glBlendFunc — specify pixel arithmetic
  • void glBlendFunc(GLenum sfactor, GLenum dfactor);
  • void glBlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor);
Parameters
  1. buf
    • For glBlendFunci, specifies the index of the draw buffer for which to set the blend function.
  2. sfactor
    • Specifies how the red, green, blue, and alpha source blending factors are computed. The initial value is GL_ONE.
  3. dfactor
    • Specifies how the red, green, blue, and alpha destination blending factors are computed. The initial value is GL_ZERO. The following symbolic constants are accepted: 
      • GL_ZERO, GL_ONE
      • GL_SRC_COLOR
      • GL_ONE_MINUS_SRC_COLOR
      • GL_DST_COLOR
      • GL_ONE_MINUS_DST_COLOR
      • GL_SRC_ALPHA
      • GL_ONE_MINUS_SRC_ALPHA
      • GL_DST_ALPHA
      • GL_ONE_MINUS_DST_ALPHA
      • GL_CONSTANT_COLOR
      • GL_ONE_MINUS_CONSTANT_COLOR
      • GL_CONSTANT_ALPHA
      • GL_ONE_MINUS_CONSTANT_ALPHA

沒有留言: