8
8
<link rel="up" href="ch01.html" title="COGL - GL Abstraction API">
9
9
<link rel="prev" href="cogl-Textures.html" title="Textures">
10
10
<link rel="next" href="cogl-Materials.html" title="Materials">
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="ch01.html" title="COGL - GL Abstraction API">
14
<link rel="index" href="ix01.html" title="Index">
14
<link rel="chapter" href="ch02.html" title="COGL experimental API">
15
<link rel="index" href="ix01.html" title="Index of all symbols">
16
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
17
<link rel="index" href="ix03.html" title="Index of new symbols in 0.8">
18
<link rel="index" href="ix04.html" title="Index of new symbols in 1.0">
19
<link rel="index" href="ix05.html" title="Index of new symbols in 1.2">
15
20
<link rel="appendix" href="license.html" title="Appendix A. License">
17
22
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
24
29
<td><a accesskey="n" href="cogl-Materials.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
26
31
<tr><td colspan="5" class="shortcuts">
28
<a href="#cogl-Blend-Strings.description" class="shortcut">Cogl Blend Strings</a>
33
<a href="#cogl-Blend-Strings.description" class="shortcut">Cogl Blend Strings</a>
31
36
<div class="refentry" title="Material Blend Strings">
48
53
<div class="section" title="Some examples">
49
54
<div class="titlepage"><div><div><h4 class="title">
50
<a name="id2815137"></a>Some examples</h4></div></div></div>
55
<a name="id2966125"></a>Some examples</h4></div></div></div>
51
56
<p>Here is an example used for blending:</p>
52
57
<pre class="programlisting">
53
58
"RGBA = ADD (SRC_COLOR * (SRC_COLOR[A]), DST_COLOR * (1-SRC_COLOR[A]))"
78
83
<pre class="programlisting">
79
84
glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
80
85
glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_REPLACE);
81
glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_REPLACE);
82
86
glTexEnvi (GL_TEXTURE_ENV, GL_SRC0_RGB, GL_PREVIOUS);
83
87
glTexEnvi (GL_TEXTURE_ENV, GL_OPERAND0_RGB, GL_SRC_COLOR);
84
88
glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_MODULATE);
85
glTexEnvi (GL_TEXTURE_ENV, GL_SRC0_RGB, GL_PREVIOUS);
86
glTexEnvi (GL_TEXTURE_ENV, GL_OPERAND0_RGB, GL_SRC_COLOR);
87
glTexEnvi (GL_TEXTURE_ENV, GL_SRC1_RGB, GL_TEXTURE);
88
glTexEnvi (GL_TEXTURE_ENV, GL_OPERAND1_RGB, GL_SRC_COLOR);
89
glTexEnvi (GL_TEXTURE_ENV, GL_SRC0_ALPHA, GL_PREVIOUS);
90
glTexEnvi (GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, GL_SRC_COLOR);
91
glTexEnvi (GL_TEXTURE_ENV, GL_SRC1_ALPHA, GL_TEXTURE);
92
glTexEnvi (GL_TEXTURE_ENV, GL_OPERAND1_ALPHA, GL_SRC_COLOR);
91
95
<div class="section" title="Here's the syntax">