1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transistional//EN"><html><head><title>OpenLayer Offline Manual</title><style type="text/css" media="all">@import "../CrystalStyle.css";</style><body bgcolor="FFFFFF" ><div align="center" style="pagestyle"><table width="60%"><tr><td><div class="parentLinks"><a href="../index.html">OpenLayer</a> | <a href="../Blenders.html">Blenders</a> | <a href="../Blenders/Set.html">Set</a></div><br><div class="BigHeader">Set</div><br><div class=""><div class="Surrounded"><table><tr valign="top"><td align="right"><div class="FuncDef"><strong><font color="#777733">static</font> <font color="#777733">void</font> <a href="../Blenders/Set.html"><font color="#0000CC">Set</font></a>(</strong></div></td><td><div class="FuncDef"><strong>Blender blender );
<br></strong></div></td></tr></table>
<br>Selects a pre-defined blender as the active color blender.
<br></div>
<br>
<br><div class="Surrounded"><table><tr valign="top"><td align="right"><div class="FuncDef"><strong><font color="#777733">static</font> <font color="#777733">void</font> <a href="../Blenders/Set.html"><font color="#0000CC">Set</font></a>(</strong></div></td><td><div class="FuncDef"><strong>GLenum sourceFactor, GLenum destFactor )
<br></strong></div></td></tr></table>
<br>Selects a custom blender as the active color blender.
<br></div>
<br>A list of the pre-defined blenders:
<br>
<br><i>ALPHA_BLENDER</i> (the default blender)
<br>
<br>Alpha values of the source pixels tell the opacity of the pixel. The higher the alpha value is, the more visible the pixel is. See more in Rgba.
<br>
<br>Bitmaps are rendered with translucent pixels if they have an alpha channel.
<br>
<br>The alpha value of Rgba colors tell the opacity of the primitive or text.
<br>
<br>
<br><i>ADDITIVE_BLENDER</i>
<br>
<br>Renderind pixels increases the lightness of the underlying pixels. The alpha value tells the intensity of the lighting.
<br>
<br>Bitmaps can be used as explosions and spotlights.
<br>
<br>Primitives can be used to lit specific areas and glowing explosion particles.
<br>
<br>Text can be used to produce lit text in dark background, like a glow in a computer screen.
<br>
<br>
<br><i>SUBTRACTIVE_BLENDER</i>
<br>
<br>Renderind pixels decreases the lightness of the underlying pixels. The darkening always happens with a full intensity.
<br>
<br>Bitmaps can be used as shadows (though the same works usually with ALPHA_BLENDER). Primitives can be used to darken specific areas.
<br>
<br>
<br><i>COPY_BLENDER</i>
<br>
<br>The alpha channel is discarted and the pixels are simply copied from the source to the destination. In other words, blending is disabled.
<br>
<br>
<br><i>FULL_ADDITIVE_BLENDER</i>
<br>
<br>Like ADDITIVE_BLENDER and COPY_BLENDER combined - discards the alpha channel and adds the pixels from the source to the destination with full intensity.
<br>
<br>
<br>A list of custom blender enumerations can be found in OpenGL documentation under glBlendFunc.</div><br><div class="MediumHeader">Examples</div><br><div class="Code"><font color="#999922">// Select the additive blender //</font>
<br><a href="../Blenders.html"><font color="#0000CC">Blenders</font></a>::<a href="../Blenders/Set.html"><font color="#0000CC">Set</font></a>( ADDITIVE_BLENDER );
<br>
<br><font color="#999922">// Select the alpha blender (used by default) //</font>
<br><a href="../Blenders.html"><font color="#0000CC">Blenders</font></a>::<a href="../Blenders/Set.html"><font color="#0000CC">Set</font></a>( ALPHA_BLENDER );
<br>
<br><font color="#999922">// Selects a custom blender which is like an inverted ALPHA_BLENDER: //</font>
<br><a href="../Blenders.html"><font color="#0000CC">Blenders</font></a>::<a href="../Blenders/Set.html"><font color="#0000CC">Set</font></a>( GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA );</div><div class=""><br><br><div class="MediumHeader">Other functions of the class <a href="../Blenders.html"><font color="#0000CC">Blenders</font></a></div><div class="Surrounded"><table size="100%" cellpadding="0" cellspacing="0"><tr><td halign="center" class="funclist"><a href="../Blenders/Set.html">Set</a></td><td width="65%" halign="center"><div class="smalltext">Selects the specified blender as the active color blender</div></td></tr><tr><td colspan="2"><br><div class="SmallHeader"><font color="#775500">Advanced functions</font></div><br></td></tr><tr><td halign="center" class="funclist"><a href="../Blenders/Push.html">Push</a></td><td width="65%" halign="center"><div class="smalltext">Pushes the active blender to the stack</div></td></tr><tr><td halign="center" class="funclist"><a href="../Blenders/Pop.html">Pop</a></td><td width="65%" halign="center"><div class="smalltext">Pops the most recently stored blender from the stack</div></td></tr></table></div><br><div class=""><a href="../index.html">Back to the main page of the manual</a></div><br>Questions about Set? Click <a href="http://crystalstorm.ath.cx/index.php?lan=en&page=CreateFeedback&subject=Set">here.</a></div></td></tr></table></body></html>
|