glBlendFunc: Unterschied zwischen den Versionen

Aus DGL Wiki
Wechseln zu: Navigation, Suche
K (Kategorie zugeordnet.)
Zeile 1: Zeile 1:
 +
{{offline}}
 +
 
= glBlendFunc =
 
= glBlendFunc =
  
 
<br>
 
<br>
 
== Name ==
 
== Name ==
Die Funktion glBlendFunc bestimmt, wie Source- und Destinationfaktor beim [[Blenden|Blending]] miteinander kombiniert werden sollen.
+
'''glBlendFunc''' - Setzt bestimmte Pixel-Berechnungen.
  
 
<br>
 
<br>
 
== Delphi-Spezifikation ==
 
== Delphi-Spezifikation ==
procedure '''glBlendFunc'''(''sfactor'' : TGLEnum; ''dfactor'': TGLEnum);
+
procedure '''glBlendFunc'''(''sfactor'' : TGLEnum; ''dfactor'': TGLEnum);
  
 
<br>
 
<br>
Zeile 13: Zeile 15:
 
<table border=1 rules=all>
 
<table border=1 rules=all>
 
  <tr>
 
  <tr>
   <td>'''Konstante'''</td>
+
   <td>'''sfactor'''</td>
   <td>'''Berücksichtigte Faktoren'''</td>
+
   <td>Gibt an, wie de Rot-, Grün-, Blau- und Alphaanteil des Quell-Blendfaktors berechned wird. Folgende symbolische Konstanten sind erlaubt : '''GL_ZERO, GL_ONE, 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_EXT, GL_ONE_MINUS_CONSTANT_COLOR_EXT, GL_CONSTANT_ALPHA_EXT, GL_ONE_MINUS_CONSTANT_ALPHA_EXT und GL_SRC_ALPHA_SATURATE'''. Vorgabewert ist '''GL_ONE'''.</td>
  <td>'''Berechneter Blendfaktor'''</td>
 
</tr>
 
<tr>
 
  <td>''GL_ZERO''</td>
 
  <td>source oder destination</td>
 
  <td>(0, 0, 0, 0)</td>
 
</tr>
 
<tr>
 
  <td>''GL_ONE''</td>
 
  <td>source oder destination</td>
 
  <td>(1, 1, 1, 1)</td>
 
</tr>
 
<tr>
 
  <td>''GL_DST_COLOR''</td>
 
  <td>source</td>
 
  <td>(Rd, Gd, Bd, Ad)</td>
 
</tr>
 
<tr>
 
  <td>''GL_SRC_COLOR''</td>
 
  <td>destination</td>
 
  <td>(Rs, Gs, Bs, As)</td>
 
</tr>
 
<tr>
 
  <td>''GL_ONE_MINUS_DST_COLOR''</td>
 
  <td>source</td>
 
  <td>(1, 1, 1, 1)-(Rd, Gd, Bd, Ad)</td>
 
</tr>
 
<tr>
 
  <td>''GL_ONE_MINUS_SRC_COLOR''</td>
 
  <td>destination</td>
 
  <td>(1, 1, 1, 1)-(Rs, Gs, Bs, As)</td>
 
</tr>
 
<tr>
 
  <td>''GL_SRC_ALPHA''</td>
 
  <td>source oder destination</td>
 
  <td>(As, As, As, As)</td>
 
</tr>
 
<tr>
 
  <td>''GL_ONE_MINUS_SRC_ALPHA''</td>
 
  <td>source oder destination</td>
 
  <td>(1, 1, 1, 1)-(As, As, As, As)</td>
 
</tr>
 
<tr>
 
  <td>''GL_DST_ALPHA''</td>
 
  <td>source oder destination</td>
 
  <td>(Ad, Ad, Ad, Ad)</td>
 
</tr>
 
<tr>
 
  <td>''GL_ONE_MINUS_DST_ALPHA''</td>
 
  <td>source oder destination</td>
 
  <td>(1, 1, 1, 1)-(Ad, Ad, Ad, Ad)</td>
 
 
  </tr>
 
  </tr>
 
  <tr>
 
  <tr>
   <td>''GL_SRC_ALPHA_SATURATE''</td>
+
   <td>'''dfactor'''</td>
   <td>source</td>
+
   <td></td>
  <td>(f, f, f, 1); f=min(As, 1-Ad)</td>
 
 
  </tr>
 
  </tr>
 
</table><br>
 
</table><br>
Erklärung der Berechnungsvariablen: <br>
 
* die kleinen Buchstaben '''d''' und '''s''' (Beispiele: A'''d''', A'''s''') stehen für Destination (Ziel) und Source (Quelle).<br>Die Daten der Quelle liegen bereits im Framebuffer, die Daten des Ziels sind die neu eintreffenden Daten.
 
* '''R''', '''G''', '''B''' und '''A''' stehen für die Farbwerte von Quelle bzw. Ziel. Sie bedeuten '''R'''ot, '''G'''rün, '''B'''lau und '''A'''lpha.
 
  
 
<br>
 
<br>

Version vom 8. September 2004, 10:28 Uhr

Vorlage:offline

glBlendFunc


Name

glBlendFunc - Setzt bestimmte Pixel-Berechnungen.


Delphi-Spezifikation

procedure glBlendFunc(sfactor : TGLEnum; dfactor: TGLEnum);


Parameter

sfactor Gibt an, wie de Rot-, Grün-, Blau- und Alphaanteil des Quell-Blendfaktors berechned wird. Folgende symbolische Konstanten sind erlaubt : GL_ZERO, GL_ONE, 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_EXT, GL_ONE_MINUS_CONSTANT_COLOR_EXT, GL_CONSTANT_ALPHA_EXT, GL_ONE_MINUS_CONSTANT_ALPHA_EXT und GL_SRC_ALPHA_SATURATE. Vorgabewert ist GL_ONE.
dfactor


Beschreibung

Die Funktion glBlendFunc bestimmt, wie Source- und Destinationfaktor beim Blending miteinander kombiniert werden sollen.


Siehe auch

glAlphaFunc, glClear, glDrawBuffer, glEnable, glLogicOp, glStencilFunc


Literatur

RedBook Kapitel 7