1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../css/manpage.css" type="text/css" />
7<title>glBlendFunc</title>
8  </head>
9  <body>
10<h1>glBlendFunc Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14GL_APICALL void GL_APIENTRY glBlendFunc(
15     GLenum sfactor,
16     GLenum dfactor
17);
18</pre>
19    </div>
20<h2>Arguments</h2>
21    <div class="section">
22      <table class="arguments">
23        <thead>
24          <tr>
25            <td width="15" />
26<th>Name</th>
27<td>Description</td>
28          </tr>
29        </thead>
30        <tr>
31<td>in</td>
32<th>sfactor</th>
33<td>Source blend factors for the blend feature</td>
34        </tr>
35        <tr>
36<td>in</td>
37<th>dfactor</th>
38<td>Destination blend factors for the blend feature</td>
39        </tr> </table>
40    </div>
41<h2>Return Values</h2>
42<div class="section">No values are returned. </div>
43<h2>Description</h2>
44    <div class="section">
45<p>Configures the source and destination blend factors for the blend feature. The same values are set for the RGB and alpha components.</p><!-- source                      sfactorおよびdfactorには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、およびGL_SRC_ALPHA_SATURATEが指定できます。                  --><P>
46You can set <span class="argument">sfactor</span> and <span class="argument">dfactor</span> to the following values. (You cannot set <span class="argument">dfactor</span> to <CODE>GL_SRC_ALPHA_SATURATE</CODE> with POD.)
47            </P><P>
48In the table, (Fr,Fg,Fb,Fa) indicates the blend factors for each RGBA component, (Rs,Gs,Bs,As) indicates the input pixel color, (Rd,Gd,Bd,Ad) indicates the pixel color stored in the framebuffer, and (Rc,Gc,Bc,Ac) indicates the constant color set by <code>glBlendColor</code>.
49</P><P><TABLE><TR><TH>GL_ZERO</TH><TD>(Fr,Fg,Fb,Fa) = (0,0,0,0)</TD></TR><TR><TH>GL_ONE</TH><TD>(Fr,Fg,Fb,Fa) = (1,1,1,1)</TD></TR><TR><TH>GL_SRC_COLOR</TH><TD>(Fr,Fg,Fb,Fa) = (Rs,Gs,Bs,As)</TD></TR><TR><TH>GL_ONE_MINUS_SRC_COLOR</TH><TD>(Fr,Fg,Fb,Fa) = (1,1,1,1) - (Rs,Gs,Bs,As)</TD></TR><TR><TH>GL_DST_COLOR</TH><TD>(Fr,Fg,Fb,Fa) = (Rd,Gd,Bd,Ad)</TD></TR><TR><TH>GL_ONE_MINUS_DST_COLOR</TH><TD>(Fr,Fg,Fb,Fa) = (1,1,1,1) - (Rd,Gd,Bd,Ad)</TD></TR><TR><TH>GL_SRC_ALPHA</TH><TD>(Fr,Fg,Fb,Fa) = (As,As,As,As)</TD></TR><TR><TH>GL_ONE_MINUS_SRC_ALPHA</TH><TD>(Fr,Fg,Fb,Fa) = (1,1,1,1) - (As,As,As,As)</TD></TR><TR><TH>GL_DST_ALPHA</TH><TD>(Fr,Fg,Fb,Fa) = (Ad,Ad,Ad,Ad)</TD></TR><TR><TH>GL_ONE_MINUS_DST_ALPHA</TH><TD>(Fr,Fg,Fb,Fa) = (1,1,1,1) - (Ad,Ad,Ad,Ad)</TD></TR><TR><TH>GL_CONSTANT_COLOR</TH><TD>(Fr,Fg,Fb,Fa) = (Rc,Gc,Bc,Ac)</TD></TR><TR><TH>GL_ONE_MINUS_CONSTANT_COLOR</TH><TD>(Fr,Fg,Fb,Fa) = (1,1,1,1) - (Rc,Gc,Bc,Ac)</TD></TR><TR><TH>GL_CONSTANT_ALPHA</TH><TD>(Fr,Fg,Fb,Fa) = (Ac,Ac,Ac,Ac)</TD></TR><TR><TH>GL_ONE_MINUS_CONSTANT_ALPHA</TH><TD>(Fr,Fg,Fb,Fa) = (1,1,1,1) - (Ac,Ac,Ac,Ac)</TD></TR><TR><TH>GL_SRC_ALPHA_SATURATE</TH><TD>(Fr,Fg,Fb,Fa) = (min(As,1-Ad),min(As,1-Ad),min(As,1-Ad),1)</TD></TR></TABLE><!-- source                      GL_ZEROは、(Fr,Fg,Fb,Fa) = (0,0,0,0) GL_ONEは、(Fr,Fg,Fb,Fa) = (1,1,1,1) GL_SRC_COLORは、(Fr,Fg,Fb,Fa) = (Rs,Gs,Bs,As) GL_ONE_MINUS_SRC_COLORは、(Fr,Fg,Fb,Fa) = (1,1,1,1) - (Rs,Gs,Bs,As) GL_DST_COLORは、(Fr,Fg,Fb,Fa) = (Rd,Gd,Bd,Ad) GL_ONE_MINUS_DST_COLORは、(Fr,Fg,Fb,Fa) = (1,1,1,1) - (Rd,Gd,Bd,Ad) GL_SRC_ALPHAは、(Fr,Fg,Fb,Fa) = (As,As,As,As) GL_ONE_MINUS_SRC_ALPHAは、(Fr,Fg,Fb,Fa) = (1,1,1,1) - (As,As,As,As) GL_DST_ALPHAは、(Fr,Fg,Fb,Fa) = (Ad,Ad,Ad,Ad) GL_ONE_MINUS_DST_ALPHAは、(Fr,Fg,Fb,Fa) = (1,1,1,1) - (Ad,Ad,Ad,Ad) GL_CONSTANT_COLORは、(Fr,Fg,Fb,Fa) = (Rc,Gc,Bc,Ac) GL_ONE_MINUS_CONSTANT_COLORは、(Fr,Fg,Fb,Fa) = (1,1,1,1) - (Rc,Gc,Bc,Ac) GL_CONSTANT_ALPHAは、(Fr,Fg,Fb,Fa) = (Ac,Ac,Ac,Ac) GL_ONE_MINUS_CONSTANT_ALPHAは、(Fr,Fg,Fb,Fa) = (1,1,1,1) - (Ac,Ac,Ac,Ac) GL_SRC_ALPHA_SATURATEは、(Fr,Fg,Fb,Fa) = (min(As,1-Ad),min(As,1-Ad),min(As,1-Ad),1)                 --></P><P>
50This function generates the following errors.
51<TABLE><TR><TH>GL_INVALID_OPERATION</TH><TD>This function was called without any command-list objects bound.</TD></TR><TR><TH>GL_INVALID_ENUM</TH><TD>The <span class="argument">sfactor</span> or <span class="argument">dfactor</span> argument was set to an invalid value.</TD></TR></TABLE><!-- source                                      コマンドリストオブジェクトをバインドしていない状態で呼び出すとエラーGL_INVALID_OPERATIONを生成します。 sfactor、dfactorに不正な値を指定した場合エラーGL_INVALID_ENUMを生成します。                 --></P></div>
52<h2>Revision History</h2>
53    <div class="section">
54      <dl class="history">
55        <dt>2010/01/07</dt>
56<dd>Initial version.<br />
57        </dd>
58      </dl>
59    </div>
60  <hr><p>CONFIDENTIAL</p></body>
61</html>