mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 18:45:32 +00:00
561 lines
26 KiB
XML
561 lines
26 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
|
|
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
|
|
<refentry id="glBlendEquationSeparate">
|
|
<refmeta>
|
|
<refmetainfo>
|
|
<copyright>
|
|
<year>1991-2006</year>
|
|
<holder>Silicon Graphics, Inc.</holder>
|
|
</copyright>
|
|
</refmetainfo>
|
|
<refentrytitle>glBlendEquationSeparate</refentrytitle>
|
|
<manvolnum>3G</manvolnum>
|
|
</refmeta>
|
|
<refnamediv>
|
|
<refname>glBlendEquationSeparate</refname>
|
|
<refpurpose>set the RGB blend equation and the alpha blend equation separately</refpurpose>
|
|
</refnamediv>
|
|
<refsynopsisdiv><title>C Specification</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>void <function>glBlendEquationSeparate</function></funcdef>
|
|
<paramdef>GLenum <parameter>modeRGB</parameter></paramdef>
|
|
<paramdef>GLenum <parameter>modeAlpha</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
</refsynopsisdiv>
|
|
<!-- eqn: ignoring delim $$ -->
|
|
<refsect1 id="parameters"><title>Parameters</title>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>modeRGB</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
specifies the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined.
|
|
It must be <constant>GL_FUNC_ADD</constant>, <constant>GL_FUNC_SUBTRACT</constant>, or
|
|
<constant>GL_FUNC_REVERSE_SUBTRACT</constant>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>modeAlpha</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
specifies the alpha blend equation, how the alpha component of the source and destination colors are combined.
|
|
It must be <constant>GL_FUNC_ADD</constant>, <constant>GL_FUNC_SUBTRACT</constant>, or
|
|
<constant>GL_FUNC_REVERSE_SUBTRACT</constant>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
<refsect1 id="description"><title>Description</title>
|
|
<para>
|
|
The blend equations determines how a new pixel (the ''source'' color)
|
|
is combined with a pixel already in the framebuffer (the ''destination''
|
|
color). This function specifies one blend equation for the RGB-color
|
|
components and one blend equation for the alpha component.
|
|
</para>
|
|
<para>
|
|
The blend equations use the source and destination blend factors
|
|
specified by either <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> or
|
|
<citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>.
|
|
See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>
|
|
for a description of the various blend factors.
|
|
</para>
|
|
<para>
|
|
In the equations that follow, source and destination
|
|
color components are referred to as
|
|
<inlineequation><mml:math>
|
|
<!-- eqn: ( R sub s, G sub s, B sub s, A sub s ):-->
|
|
<mml:mfenced open="(" close=")">
|
|
<mml:msub><mml:mi mathvariant="italic">R</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">G</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">B</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">A</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
</mml:mfenced>
|
|
</mml:math></inlineequation>
|
|
and
|
|
<inlineequation><mml:math>
|
|
<!-- eqn: ( R sub d, G sub d, B sub d, A sub d ):-->
|
|
<mml:mfenced open="(" close=")">
|
|
<mml:msub><mml:mi mathvariant="italic">R</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">G</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">B</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">A</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
</mml:mfenced>
|
|
</mml:math></inlineequation>,
|
|
respectively.
|
|
The result color is referred to as
|
|
<inlineequation><mml:math>
|
|
<!-- eqn: ( R sub r, G sub r, B sub r, A sub r ):-->
|
|
<mml:mfenced open="(" close=")">
|
|
<mml:msub><mml:mi mathvariant="italic">R</mml:mi>
|
|
<mml:mi mathvariant="italic">r</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">G</mml:mi>
|
|
<mml:mi mathvariant="italic">r</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">B</mml:mi>
|
|
<mml:mi mathvariant="italic">r</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">A</mml:mi>
|
|
<mml:mi mathvariant="italic">r</mml:mi>
|
|
</mml:msub>
|
|
</mml:mfenced>
|
|
</mml:math></inlineequation>.
|
|
The source and destination blend factors are denoted
|
|
<inlineequation><mml:math>
|
|
<!-- eqn: ( s sub R, s sub G, s sub B, s sub A ):-->
|
|
<mml:mfenced open="(" close=")">
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">R</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">G</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">B</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">A</mml:mi>
|
|
</mml:msub>
|
|
</mml:mfenced>
|
|
</mml:math></inlineequation>
|
|
and
|
|
<inlineequation><mml:math>
|
|
<!-- eqn: ( d sub R, d sub G, d sub B, d sub A ):-->
|
|
<mml:mfenced open="(" close=")">
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">R</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">G</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">B</mml:mi>
|
|
</mml:msub>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">A</mml:mi>
|
|
</mml:msub>
|
|
</mml:mfenced>
|
|
</mml:math></inlineequation>,
|
|
respectively.
|
|
For these equations all color components are understood to have values
|
|
in the range
|
|
<inlineequation><mml:math>
|
|
<!-- eqn: [0,1]:-->
|
|
<mml:mfenced open="[" close="]">
|
|
<mml:mn>0</mml:mn>
|
|
<mml:mn>1</mml:mn>
|
|
</mml:mfenced>
|
|
</mml:math></inlineequation>.
|
|
|
|
<informaltable frame="topbot">
|
|
<tgroup cols="3" align="left">
|
|
<colspec/>
|
|
<colspec/>
|
|
<colspec/>
|
|
<thead>
|
|
<row>
|
|
<entry rowsep="1" align="left"><emphasis role="bold">
|
|
Mode
|
|
</emphasis></entry>
|
|
<entry rowsep="1" align="left"><emphasis role="bold">
|
|
RGB Components
|
|
</emphasis></entry>
|
|
<entry rowsep="1" align="left"><emphasis role="bold">
|
|
Alpha Component
|
|
</emphasis></entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry align="left">
|
|
<constant>GL_FUNC_ADD</constant>
|
|
</entry>
|
|
<entry align="left">
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Rr = R sub s s sub R + R sub d d sub R :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Rr</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">R</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">R</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>+</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">R</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">R</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Gr = G sub s s sub G + G sub d d sub G :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Gr</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">G</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">G</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>+</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">G</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">G</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Br = B sub s s sub B + B sub d d sub B :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Br</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">B</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">B</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>+</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">B</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">B</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
</entry>
|
|
<entry align="left">
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Ar = A sub s s sub A + A sub d d sub A :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Ar</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">A</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">A</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>+</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">A</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">A</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry align="left">
|
|
<constant>GL_FUNC_SUBTRACT</constant>
|
|
</entry>
|
|
<entry align="left">
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Rr = R sub s s sub R - R sub d d sub R :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Rr</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">R</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">R</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>-</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">R</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">R</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Gr = G sub s s sub G - G sub d d sub G :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Gr</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">G</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">G</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>-</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">G</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">G</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Br = B sub s s sub B - B sub d d sub B :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Br</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">B</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">B</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>-</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">B</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">B</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
</entry>
|
|
<entry align="left">
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Ar = A sub s s sub A - A sub d d sub A :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Ar</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">A</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">A</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>-</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">A</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">A</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry align="left">
|
|
<constant>GL_FUNC_REVERSE_SUBTRACT</constant>
|
|
</entry>
|
|
<entry align="left">
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Rr = R sub d d sub R - R sub s s sub R :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Rr</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">R</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">R</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>-</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">R</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">R</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Gr = G sub d d sub G - G sub s s sub G :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Gr</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">G</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">G</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>-</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">G</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">G</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Br = B sub d d sub B - B sub s s sub B :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Br</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">B</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">B</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>-</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">B</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">B</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
</entry>
|
|
<entry align="left">
|
|
<informalequation><mml:math>
|
|
<!-- eqn: Ar = A sub d d sub A - A sub s s sub A :-->
|
|
<mml:mrow>
|
|
<mml:mi mathvariant="italic">Ar</mml:mi>
|
|
<mml:mo>=</mml:mo>
|
|
<mml:mrow>
|
|
<mml:msub><mml:mi mathvariant="italic">A</mml:mi>
|
|
<mml:mi mathvariant="italic">d</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">d</mml:mi>
|
|
<mml:mi mathvariant="italic">A</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>-</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">A</mml:mi>
|
|
<mml:mi mathvariant="italic">s</mml:mi>
|
|
</mml:msub>
|
|
<mml:mo>⁢</mml:mo>
|
|
<mml:msub><mml:mi mathvariant="italic">s</mml:mi>
|
|
<mml:mi mathvariant="italic">A</mml:mi>
|
|
</mml:msub>
|
|
</mml:mrow>
|
|
</mml:mrow>
|
|
</mml:math></informalequation>
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
<para>
|
|
The results of these equations are clamped to the range
|
|
<inlineequation><mml:math>
|
|
<!-- eqn: [0,1]:-->
|
|
<mml:mfenced open="[" close="]">
|
|
<mml:mn>0</mml:mn>
|
|
<mml:mn>1</mml:mn>
|
|
</mml:mfenced>
|
|
</mml:math></inlineequation>.
|
|
</para>
|
|
<para>
|
|
The <constant>GL_FUNC_ADD</constant> equation is useful
|
|
for antialiasing and transparency, among other things.
|
|
</para>
|
|
<para>
|
|
Initially, both the RGB blend equation and the alpha blend equation are set to <constant>GL_FUNC_ADD</constant>.
|
|
</para>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="errors"><title>Errors</title>
|
|
<para>
|
|
<constant>GL_INVALID_ENUM</constant> is generated if either <parameter>modeRGB</parameter> or <parameter>modeAlpha</parameter> is not one of
|
|
<constant>GL_FUNC_ADD</constant>, <constant>GL_FUNC_SUBTRACT</constant>, or <constant>GL_FUNC_REVERSE_SUBTRACT</constant>.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
|
<para>
|
|
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with an argument of <constant>GL_BLEND_EQUATION_RGB</constant>
|
|
</para>
|
|
<para>
|
|
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with an argument of <constant>GL_BLEND_EQUATION_ALPHA</constant>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="seealso"><title>See Also</title>
|
|
<para>
|
|
<citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry>,
|
|
<citerefentry><refentrytitle>glBlendColor</refentrytitle></citerefentry>,
|
|
<citerefentry><refentrytitle>glBlendEquation</refentrytitle></citerefentry>,
|
|
<citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
|
|
<citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="copyright"><title>Copyright</title>
|
|
<para>
|
|
Copyright <trademark class="copyright"></trademark> 2006 Khronos Group.
|
|
This material may be distributed subject to the terms and conditions set forth in
|
|
the Open Publication License, v 1.0, 8 June 1999.
|
|
<ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|