1GLBLENDEQUATION(3G)             [FIXME: manual]            GLBLENDEQUATION(3G)
2
3
4

NAME

6       glBlendEquation - specify the equation used for both the RGB blend
7       equation and the Alpha blend equation
8

C SPECIFICATION

10       void glBlendEquation(GLenum mode);
11
12       void glBlendEquationi(GLuint buf, GLenum mode);
13

PARAMETERS

15       buf
16           for glBlendEquationi, specifies the index of the draw buffer for
17           which to set the blend equation.
18
19       mode
20           specifies how source and destination colors are combined. It must
21           be GL_FUNC_ADD, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT, GL_MIN,
22           GL_MAX.
23

DESCRIPTION

25       The blend equations determine how a new pixel (the ''source'' color) is
26       combined with a pixel already in the framebuffer (the ''destination''
27       color). This function sets both the RGB blend equation and the alpha
28       blend equation to a single equation.  glBlendEquationi specifies the
29       blend equation for a single draw buffer whereas glBlendEquation sets
30       the blend equation for all draw buffers.
31
32       These equations use the source and destination blend factors specified
33       by either glBlendFunc() or glBlendFuncSeparate(). See glBlendFunc() or
34       glBlendFuncSeparate() for a description of the various blend factors.
35
36       In the equations that follow, source and destination color components
37       are referred to as R s G s B s A s and R d G d B d A d, respectively.
38       The result color is referred to as R r G r B r A r. The source and
39       destination blend factors are denoted s R s G s B s A and d R d G d B d
40       A, respectively. For these equations all color components are
41       understood to have values in the range 0 1.
42
43       ┌─────────────────────────┬───────────────────────────────────────────────────┬───────────────────────────────────────────────────┐
44Mode                    RGB Components                                   Alpha Component                                  
45       ├─────────────────────────┼───────────────────────────────────────────────────┼───────────────────────────────────────────────────┤
46GL_FUNC_ADD              │ Rr                                                │ Ar                                                │
47       │                         │                                 =                 │                                 =                 │
48       │                         │                                                   │                                                   │
49       │                         │                                     R             │                                     A             │
50       │                         │                                     s             │                                     s             │
51       │                         │                                                   │                                                   │
52       │                         │                                     ⁢             │                                     ⁢             │
53       │                         │                                     s             │                                     s             │
54       │                         │                                     R             │                                     A             │
55       │                         │                                                   │                                                   │
56       │                         │                                     +             │                                     +             │
57       │                         │                                     R             │                                     A             │
58       │                         │                                     d             │                                     d             │
59       │                         │                                                   │                                                   │
60       │                         │                                     ⁢             │                                     ⁢             │
61       │                         │                                     d             │                                     d             │
62       │                         │                                     R             │                                     A             │
63       │                         │                                                   │                                                   │
64       │                         │                                                   │                                                   │
65       │                         │                                                   │                                                   │
66       │                         │                                                   │                                                   │
67       │                         │                                                   │                                                   │
68       │                         │                                                   │                                                   │
69       │                         │                                                   │                                                   │
70       │                         │                                 Gr                │                                                   │
71       │                         │                                 =                 │                                                   │
72       │                         │                                                   │                                                   │
73       │                         │                                     G             │                                                   │
74       │                         │                                     s             │                                                   │
75       │                         │                                                   │                                                   │
76       │                         │                                     ⁢             │                                                   │
77       │                         │                                     s             │                                                   │
78       │                         │                                     G             │                                                   │
79       │                         │                                                   │                                                   │
80       │                         │                                     +             │                                                   │
81       │                         │                                     G             │                                                   │
82       │                         │                                     d             │                                                   │
83       │                         │                                                   │                                                   │
84       │                         │                                     ⁢             │                                                   │
85       │                         │                                     d             │                                                   │
86       │                         │                                     G             │                                                   │
87       │                         │                                                   │                                                   │
88       │                         │                                                   │                                                   │
89       │                         │                                                   │                                                   │
90       │                         │                                                   │                                                   │
91       │                         │                                                   │                                                   │
92       │                         │                                                   │                                                   │
93       │                         │                                                   │                                                   │
94       │                         │                                 Br                │                                                   │
95       │                         │                                 =                 │                                                   │
96       │                         │                                                   │                                                   │
97       │                         │                                     B             │                                                   │
98       │                         │                                     s             │                                                   │
99       │                         │                                                   │                                                   │
100       │                         │                                     ⁢             │                                                   │
101       │                         │                                     s             │                                                   │
102       │                         │                                     B             │                                                   │
103       │                         │                                                   │                                                   │
104       │                         │                                     +             │                                                   │
105       │                         │                                     B             │                                                   │
106       │                         │                                     d             │                                                   │
107       │                         │                                                   │                                                   │
108       │                         │                                     ⁢             │                                                   │
109       │                         │                                     d             │                                                   │
110       │                         │                                     B             │                                                   │
111       ├─────────────────────────┼───────────────────────────────────────────────────┼───────────────────────────────────────────────────┤
112GL_FUNC_SUBTRACT         │ Rr                                                │ Ar                                                │
113       │                         │                                 =                 │                                 =                 │
114       │                         │                                                   │                                                   │
115       │                         │                                     R             │                                     A             │
116       │                         │                                     s             │                                     s             │
117       │                         │                                                   │                                                   │
118       │                         │                                     ⁢             │                                     ⁢             │
119       │                         │                                     s             │                                     s             │
120       │                         │                                     R             │                                     A             │
121       │                         │                                                   │                                                   │
122       │                         │                                     -             │                                     -             │
123       │                         │                                     R             │                                     A             │
124       │                         │                                     d             │                                     d             │
125       │                         │                                                   │                                                   │
126       │                         │                                     ⁢             │                                     ⁢             │
127       │                         │                                     d             │                                     d             │
128       │                         │                                     R             │                                     A             │
129       │                         │                                                   │                                                   │
130       │                         │                                                   │                                                   │
131       │                         │                                                   │                                                   │
132       │                         │                                                   │                                                   │
133       │                         │                                                   │                                                   │
134       │                         │                                                   │                                                   │
135       │                         │                                                   │                                                   │
136       │                         │                                 Gr                │                                                   │
137       │                         │                                 =                 │                                                   │
138       │                         │                                                   │                                                   │
139       │                         │                                     G             │                                                   │
140       │                         │                                     s             │                                                   │
141       │                         │                                                   │                                                   │
142       │                         │                                     ⁢             │                                                   │
143       │                         │                                     s             │                                                   │
144       │                         │                                     G             │                                                   │
145       │                         │                                                   │                                                   │
146       │                         │                                     -             │                                                   │
147       │                         │                                     G             │                                                   │
148       │                         │                                     d             │                                                   │
149       │                         │                                                   │                                                   │
150       │                         │                                     ⁢             │                                                   │
151       │                         │                                     d             │                                                   │
152       │                         │                                     G             │                                                   │
153       │                         │                                                   │                                                   │
154       │                         │                                                   │                                                   │
155       │                         │                                                   │                                                   │
156       │                         │                                                   │                                                   │
157       │                         │                                                   │                                                   │
158       │                         │                                                   │                                                   │
159       │                         │                                                   │                                                   │
160       │                         │                                 Br                │                                                   │
161       │                         │                                 =                 │                                                   │
162       │                         │                                                   │                                                   │
163       │                         │                                     B             │                                                   │
164       │                         │                                     s             │                                                   │
165       │                         │                                                   │                                                   │
166       │                         │                                     ⁢             │                                                   │
167       │                         │                                     s             │                                                   │
168       │                         │                                     B             │                                                   │
169       │                         │                                                   │                                                   │
170       │                         │                                     -             │                                                   │
171       │                         │                                     B             │                                                   │
172       │                         │                                     d             │                                                   │
173       │                         │                                                   │                                                   │
174       │                         │                                     ⁢             │                                                   │
175       │                         │                                     d             │                                                   │
176       │                         │                                     B             │                                                   │
177       ├─────────────────────────┼───────────────────────────────────────────────────┼───────────────────────────────────────────────────┤
178GL_FUNC_REVERSE_SUBTRACT │ Rr                                                │ Ar                                                │
179       │                         │                                     =             │                                     =             │
180       │                         │                                                   │                                                   │
181       │                         │                                         R         │                                         A         │
182       │                         │                                         d         │                                         d         │
183       │                         │                                                   │                                                   │
184       │                         │                                         ⁢         │                                         ⁢         │
185       │                         │                                         d         │                                         d         │
186       │                         │                                         R         │                                         A         │
187       │                         │                                                   │                                                   │
188       │                         │                                         -         │                                         -         │
189       │                         │                                         R         │                                         A         │
190       │                         │                                         s         │                                         s         │
191       │                         │                                                   │                                                   │
192       │                         │                                         ⁢         │                                         ⁢         │
193       │                         │                                         s         │                                         s         │
194       │                         │                                         R         │                                         A         │
195       │                         │                                                   │                                                   │
196       │                         │                                                   │                                                   │
197       │                         │                                                   │                                                   │
198       │                         │                                                   │                                                   │
199       │                         │                                                   │                                                   │
200       │                         │                                                   │                                                   │
201       │                         │                                                   │                                                   │
202       │                         │                                     Gr            │                                                   │
203       │                         │                                     =             │                                                   │
204       │                         │                                                   │                                                   │
205       │                         │                                         G         │                                                   │
206       │                         │                                         d         │                                                   │
207       │                         │                                                   │                                                   │
208       │                         │                                         ⁢         │                                                   │
209       │                         │                                         d         │                                                   │
210       │                         │                                         G         │                                                   │
211       │                         │                                                   │                                                   │
212       │                         │                                         -         │                                                   │
213       │                         │                                         G         │                                                   │
214       │                         │                                         s         │                                                   │
215       │                         │                                                   │                                                   │
216       │                         │                                         ⁢         │                                                   │
217       │                         │                                         s         │                                                   │
218       │                         │                                         G         │                                                   │
219       │                         │                                                   │                                                   │
220       │                         │                                                   │                                                   │
221       │                         │                                                   │                                                   │
222       │                         │                                                   │                                                   │
223       │                         │                                                   │                                                   │
224       │                         │                                                   │                                                   │
225       │                         │                                                   │                                                   │
226       │                         │                                     Br            │                                                   │
227       │                         │                                     =             │                                                   │
228       │                         │                                                   │                                                   │
229       │                         │                                         B         │                                                   │
230       │                         │                                         d         │                                                   │
231       │                         │                                                   │                                                   │
232       │                         │                                         ⁢         │                                                   │
233       │                         │                                         d         │                                                   │
234       │                         │                                         B         │                                                   │
235       │                         │                                                   │                                                   │
236       │                         │                                         -         │                                                   │
237       │                         │                                         B         │                                                   │
238       │                         │                                         s         │                                                   │
239       │                         │                                                   │                                                   │
240       │                         │                                         ⁢         │                                                   │
241       │                         │                                         s         │                                                   │
242       │                         │                                         B         │                                                   │
243       ├─────────────────────────┼───────────────────────────────────────────────────┼───────────────────────────────────────────────────┤
244GL_MIN                   │ Rr                                                │ Ar                                                │
245       │                         │                                     =             │                                     =             │
246       │                         │                                                   │                                                   │
247       │                         │                                         min       │                                         min       │
248       │                         │                                         ⁡         │                                         ⁡         │
249       │                         │                                                   │                                                   │
250       │                         │                                                   │                                                   │
251       │                         │                                                 R │                                                 A │
252       │                         │                                                 s │                                                 s │
253       │                         │                                                   │                                                   │
254       │                         │                                                   │                                                   │
255       │                         │                                                   │                                                   │
256       │                         │                                                 R │                                                 A │
257       │                         │                                                 d │                                                 d │
258       │                         │                                                   │                                                   │
259       │                         │                                                   │                                                   │
260       │                         │                                                   │                                                   │
261       │                         │                                                   │                                                   │
262       │                         │                                                   │                                                   │
263       │                         │                                                   │                                                   │
264       │                         │                                                   │                                                   │
265       │                         │                                                   │                                                   │
266       │                         │                                                   │                                                   │
267       │                         │                                     Gr            │                                                   │
268       │                         │                                     =             │                                                   │
269       │                         │                                                   │                                                   │
270       │                         │                                         min       │                                                   │
271       │                         │                                         ⁡         │                                                   │
272       │                         │                                                   │                                                   │
273       │                         │                                                   │                                                   │
274       │                         │                                                 G │                                                   │
275       │                         │                                                 s │                                                   │
276       │                         │                                                   │                                                   │
277       │                         │                                                   │                                                   │
278       │                         │                                                   │                                                   │
279       │                         │                                                 G │                                                   │
280       │                         │                                                 d │                                                   │
281       │                         │                                                   │                                                   │
282       │                         │                                                   │                                                   │
283       │                         │                                                   │                                                   │
284       │                         │                                                   │                                                   │
285       │                         │                                                   │                                                   │
286       │                         │                                                   │                                                   │
287       │                         │                                                   │                                                   │
288       │                         │                                                   │                                                   │
289       │                         │                                                   │                                                   │
290       │                         │                                     Br            │                                                   │
291       │                         │                                     =             │                                                   │
292       │                         │                                                   │                                                   │
293       │                         │                                         min       │                                                   │
294       │                         │                                         ⁡         │                                                   │
295       │                         │                                                   │                                                   │
296       │                         │                                                   │                                                   │
297       │                         │                                                 B │                                                   │
298       │                         │                                                 s │                                                   │
299       │                         │                                                   │                                                   │
300       │                         │                                                   │                                                   │
301       │                         │                                                   │                                                   │
302       │                         │                                                 B │                                                   │
303       │                         │                                                 d │                                                   │
304       ├─────────────────────────┼───────────────────────────────────────────────────┼───────────────────────────────────────────────────┤
305GL_MAX                   │ Rr                                                │ Ar                                                │
306       │                         │                                     =             │                                     =             │
307       │                         │                                                   │                                                   │
308       │                         │                                         max       │                                         max       │
309       │                         │                                         ⁡         │                                         ⁡         │
310       │                         │                                                   │                                                   │
311       │                         │                                                   │                                                   │
312       │                         │                                                 R │                                                 A │
313       │                         │                                                 s │                                                 s │
314       │                         │                                                   │                                                   │
315       │                         │                                                   │                                                   │
316       │                         │                                                   │                                                   │
317       │                         │                                                 R │                                                 A │
318       │                         │                                                 d │                                                 d │
319       │                         │                                                   │                                                   │
320       │                         │                                                   │                                                   │
321       │                         │                                                   │                                                   │
322       │                         │                                                   │                                                   │
323       │                         │                                                   │                                                   │
324       │                         │                                                   │                                                   │
325       │                         │                                                   │                                                   │
326       │                         │                                                   │                                                   │
327       │                         │                                                   │                                                   │
328       │                         │                                     Gr            │                                                   │
329       │                         │                                     =             │                                                   │
330       │                         │                                                   │                                                   │
331       │                         │                                         max       │                                                   │
332       │                         │                                         ⁡         │                                                   │
333       │                         │                                                   │                                                   │
334       │                         │                                                   │                                                   │
335       │                         │                                                 G │                                                   │
336       │                         │                                                 s │                                                   │
337       │                         │                                                   │                                                   │
338       │                         │                                                   │                                                   │
339       │                         │                                                   │                                                   │
340       │                         │                                                 G │                                                   │
341       │                         │                                                 d │                                                   │
342       │                         │                                                   │                                                   │
343       │                         │                                                   │                                                   │
344       │                         │                                                   │                                                   │
345       │                         │                                                   │                                                   │
346       │                         │                                                   │                                                   │
347       │                         │                                                   │                                                   │
348       │                         │                                                   │                                                   │
349       │                         │                                                   │                                                   │
350       │                         │                                                   │                                                   │
351       │                         │                                     Br            │                                                   │
352       │                         │                                     =             │                                                   │
353       │                         │                                                   │                                                   │
354       │                         │                                         max       │                                                   │
355       │                         │                                         ⁡         │                                                   │
356       │                         │                                                   │                                                   │
357       │                         │                                                   │                                                   │
358       │                         │                                                 B │                                                   │
359       │                         │                                                 s │                                                   │
360       │                         │                                                   │                                                   │
361       │                         │                                                   │                                                   │
362       │                         │                                                   │                                                   │
363       │                         │                                                 B │                                                   │
364       │                         │                                                 d │                                                   │
365       └─────────────────────────┴───────────────────────────────────────────────────┴───────────────────────────────────────────────────┘
366
367       The results of these equations are clamped to the range 0 1.
368
369       The GL_MIN and GL_MAX equations are useful for applications that
370       analyze image data (image thresholding against a constant color, for
371       example). The GL_FUNC_ADD equation is useful for antialiasing and
372       transparency, among other things.
373
374       Initially, both the RGB blend equation and the alpha blend equation are
375       set to GL_FUNC_ADD.
376

NOTES

378       The GL_MIN, and GL_MAX equations do not use the source or destination
379       factors, only the source and destination colors.
380

ERRORS

382       GL_INVALID_ENUM is generated if mode is not one of GL_FUNC_ADD,
383       GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT, GL_MAX, or GL_MIN.
384
385       GL_INVALID_VALUE is generated by glBlendEquationi if buf is greater
386       than or equal to the value of GL_MAX_DRAW_BUFFERS.
387

ASSOCIATED GETS

389       glGet() with an argument of GL_BLEND_EQUATION_RGB
390
391       glGet() with an argument of GL_BLEND_EQUATION_ALPHA
392

VERSION SUPPORT

394       ┌─────────────────┬───────────────────────────────────────────────────────────────────────┐
395       │                 │                OpenGL Version                                         
396       ├─────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
397Function         2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 
398/                │     │     │     │     │     │     │     │     │     │     │     │     │
399Feature          │     │     │     │     │     │     │     │     │     │     │     │     │
400Name             │     │     │     │     │     │     │     │     │     │     │     │     │
401       ├─────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
402glBlendEquation  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
403       ├─────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
404glBlendEquationi │  -  │  -  │  -  │  -  │  -  │  -  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
405       └─────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
406

SEE ALSO

408       glBlendColor(), glBlendFunc() glBlendFuncSeparate()
409
411       Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014
412       Khronos Group. This document is licensed under the SGI Free Software B
413       License. For details, see http://oss.sgi.com/projects/FreeB/.
414
416       Copyright © 1991-2006 Silicon Graphics, Inc.
417       Copyright © 2010-2014 Khronos Group
418
419
420
421[FIXME: source]                   07/13/2018               GLBLENDEQUATION(3G)
Impressum