• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    EXT_blend_subtract
4
5Name Strings
6
7    GL_EXT_blend_subtract
8
9Version
10
11    $Date: 1995/03/31 04:40:39 $ $Revision: 1.4 $
12
13Number
14
15    38
16
17Dependencies
18
19    EXT_blend_minmax affects the definition of this extension
20
21Overview
22
23    Two additional blending equations are specified using the interface
24    defined by EXT_blend_minmax.  These equations are similar to the
25    default blending equation, but produce the difference of its left
26    and right hand sides, rather than the sum.  Image differences are
27    useful in many image processing applications.
28
29New Procedures and Functions
30
31    None
32
33New Tokens
34
35    Accepted by the <mode> parameter of BlendEquationEXT:
36
37        FUNC_SUBTRACT_EXT                0x800A
38        FUNC_REVERSE_SUBTRACT_EXT        0x800B
39
40Additions to Chapter 2 of the GL Specification (OpenGL Operation)
41
42    None
43
44Additions to Chapter 3 of the GL Specification (Rasterization)
45
46    None
47
48Additions to Chapter 4 of the GL Specification (Per-Fragment Operations
49and the Framebuffer)
50
51    Two additional blending equations are defined.  If BlendEquationEXT is
52    called with <mode> set to FUNC_SUBTRACT_EXT, the blending equation
53    becomes
54
55        C' = (Cs * S) - (Cd * D)
56
57             /  0.0     C' < 0.0
58        C = (
59             \   C'     C' >= 0.0
60
61    where Cs and Cd are the source and destination colors, and S and D are
62    as specified by BlendFunc.
63
64    If BlendEquationEXT is called with <mode> set to
65    FUNC_REVERSE_SUBTRACT_EXT, the blending equation becomes
66
67        C' = (Cd * D) - (Cs * S)
68
69             /  0.0     C' < 0.0
70        C = (
71             \   C'     C' >= 0.0
72
73    In all cases the blending equation is evaluated separately for each
74    color component.
75
76Additions to Chapter 5 of the GL Specification (Special Functions)
77
78    None
79
80Additions to Chapter 6 of the GL Specification (State and State Requests)
81
82    None
83
84Additions to the GLX Specification
85
86    None
87
88GLX Protocol
89
90    None
91
92Dependencies on EXT_blend_minmax
93
94    If this extension is supported, but EXT_blend_minmax is not, then
95    this extension effectively defines the procedure BlendEquationEXT, its
96    parameter FUNC_ADD_EXT, and the query target BLEND_EQUATION_EXT, as
97    described in EXT_blend_minmax.  It is therefore as though
98    EXT_blend_minmax were also supported, except that equations MIN_EXT
99    and MAX_EXT are not supported.
100
101Errors
102
103    INVALID_ENUM is generated by BlendEquationEXT if its single parameter
104    is not FUNC_ADD_EXT, MIN_EXT, MAX_EXT, FUNC_SUBTRACT_EXT, or
105    FUNC_REVERSE_SUBTRACT_EXT.
106
107    INVALID_OPERATION is generated if BlendEquationEXT is executed between
108    the execution of Begin and the corresponding execution to End.
109
110New State
111
112    Get Value           Get Command     Type    Initial Value   Attribute
113    ---------           -----------     ----    -------------   ---------
114    BLEND_EQUATION_EXT  GetIntegerv     Z5      FUNC_ADD_EXT    color-buffer
115
116New Implementation Dependent State
117
118    None
119