ó
    š3jL  ã                   ó`   • S r SSKJrJrJr  SSKJrJr  SSKrSSKJ	r	J
r
  SSK7  SSKJr  S rg)	aö  OpenGL extension KHR.blend_equation_advanced

This module customises the behaviour of the 
OpenGL.raw.GL.KHR.blend_equation_advanced to provide a more 
Python-friendly API

Overview (from the spec)
        
        This extension adds a number of "advanced" blending equations that can be
        used to perform new color blending operations, many of which are more
        complex than the standard blend modes provided by unextended OpenGL.  This
        extension provides two different extension string entries:
        
        - KHR_blend_equation_advanced:  Provides the new blending equations, but
          guarantees defined results only if each sample is touched no more than
          once in any single rendering pass.  The command BlendBarrierKHR() is
          provided to indicate a boundary between passes.
        
        - KHR_blend_equation_advanced_coherent:  Provides the new blending
          equations, and guarantees that blending is done coherently and in API
          primitive order.  An enable is provided to allow implementations to opt
          out of fully coherent blending and instead behave as though only
          KHR_blend_equation_advanced were supported.
        
        Some implementations may support KHR_blend_equation_advanced without
        supporting KHR_blend_equation_advanced_coherent.
        
        In unextended OpenGL, the set of blending equations is limited, and can be
        expressed very simply.  The MIN and MAX blend equations simply compute
        component-wise minimums or maximums of source and destination color
        components.  The FUNC_ADD, FUNC_SUBTRACT, and FUNC_REVERSE_SUBTRACT
        multiply the source and destination colors by source and destination
        factors and either add the two products together or subtract one from the
        other.  This limited set of operations supports many common blending
        operations but precludes the use of more sophisticated transparency and
        blending operations commonly available in many dedicated imaging APIs.
        
        This extension provides a number of new "advanced" blending equations.
        Unlike traditional blending operations using the FUNC_ADD equation, these
        blending equations do not use source and destination factors specified by
        BlendFunc.  Instead, each blend equation specifies a complete equation
        based on the source and destination colors.  These new blend equations are
        used for both RGB and alpha components; they may not be used to perform
        separate RGB and alpha blending (via functions like
        BlendEquationSeparate).
        
        These blending operations are performed using premultiplied source and
        destination colors, where RGB colors produced by the fragment shader and
        stored in the framebuffer are considered to be multiplied by alpha
        (coverage).  Many of these advanced blending equations are formulated
        where the result of blending source and destination colors with partial
        coverage have three separate contributions:  from the portions covered by
        both the source and the destination, from the portion covered only by the
        source, and from the portion covered only by the destination.  Such
        equations are defined assuming that the source and destination coverage
        have no spatial correlation within the pixel.
        
        In addition to the coherency issues on implementations not supporting
        KHR_blend_equation_advanced_coherent, this extension has several
        limitations worth noting.  First, the new blend equations are not
        supported while rendering to more than one color buffer at once; an
        INVALID_OPERATION will be generated if an application attempts to render
        any primitives in this unsupported configuration.  Additionally, blending
        precision may be limited to 16-bit floating-point, which could result in a
        loss of precision and dynamic range for framebuffer formats with 32-bit
        floating-point components, and in a loss of precision for formats with 12-
        and 16-bit signed or unsigned normalized integer components.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/KHR/blend_equation_advanced.txt
é    )ÚplatformÚconstantÚarrays)Ú
extensionsÚwrapperN)Ú_typesÚ_glgets)Ú*)Ú_EXTENSION_NAMEc                  ó:   • SSK Jn   U R                  " [        5      $ )z=Return boolean indicating whether this extension is availabler   ©r   )ÚOpenGLr   ÚhasGLExtensionr   r   s    Ú_/home/wildlama/miniconda3/lib/python3.13/site-packages/OpenGL/GL/KHR/blend_equation_advanced.pyÚglInitBlendEquationAdvancedKHRr   O   s   € å!Ø×$Ò$¤oÓ7Ð7ó    )Ú__doc__r   r   r   r   r   r   ÚctypesÚOpenGL.raw.GLr   r	   Ú)OpenGL.raw.GL.KHR.blend_equation_advancedr   r   © r   r   Ú<module>r      s(   ðñF÷N .Ñ -ß &Û ß )Ü 7Ý Eó8r   