<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>OpenSceneGraph: osg::BlendColor Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.4 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">OpenSceneGraph <span id="projectnumber">2.8.4</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="a01628.html">osg</a> </li> <li class="navelem"><a class="el" href="a00057.html">BlendColor</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> | <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> | <a href="#pro-attribs">Protected Attributes</a> </div> <div class="headertitle"> <div class="title">osg::BlendColor Class Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="osg::BlendColor" --><!-- doxytag: inherits="osg::StateAttribute" --> <p>Encapsulates OpenGL blend/transparency state. <a href="a00057.html#details">More...</a></p> <div class="dynheader"> Inheritance diagram for osg::BlendColor:</div> <div class="dyncontent"> <div class="center"><img src="a01689.png" border="0" usemap="#osg_1_1BlendColor_inherit__map" alt="Inheritance graph"/></div> <map name="osg_1_1BlendColor_inherit__map" id="osg_1_1BlendColor_inherit__map"> <area shape="rect" id="node2" href="a00743.html" title="Base class for state attributes." alt="" coords="5,160,163,189"/><area shape="rect" id="node4" href="a00500.html" title="Base class/standard interface for objects which require IO support, cloning and reference counting..." alt="" coords="33,83,135,112"/><area shape="rect" id="node6" href="a00627.html" title="Base class from providing referencing counted objects." alt="" coords="17,5,151,35"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="a01690.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="nested-classes"></a> Classes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00270.html">Extensions</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Encapsulates queries of extension availability, obtains extension function pointers, and provides convenience wrappers for calling extension functions. <a href="a00270.html#details">More...</a><br/></td></tr> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a2681e7478424b0f3922e8ece9567ce68">BlendColor</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#aac21c1417b8f5c25d5608eaeb299bb21">BlendColor</a> (const <a class="el" href="a01074.html">osg::Vec4</a> &constantColor)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a46ecdf92f7bd5bd958cacb1191b35dae">BlendColor</a> (const <a class="el" href="a00057.html">BlendColor</a> &trans, const <a class="el" href="a00169.html">CopyOp</a> &copyop=CopyOp::SHALLOW_COPY)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor using <a class="el" href="a00169.html" title="Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...">CopyOp</a> to manage deep vs shallow copy. <a href="#a46ecdf92f7bd5bd958cacb1191b35dae"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#aa8c4b7776046f1f1e7dad4555ba7ef1f">META_StateAttribute</a> (osg, <a class="el" href="a00057.html">BlendColor</a>, BLENDCOLOR)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#aa18d3a9964870597d823d04d09365ffa">compare</a> (const <a class="el" href="a00743.html">StateAttribute</a> &sa) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. <a href="#aa18d3a9964870597d823d04d09365ffa"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a7da30e0f5f94c250c025718c6cdaffce">getModeUsage</a> (<a class="el" href="a00475.html">StateAttribute::ModeUsage</a> &usage) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the modes associated with this <a class="el" href="a00743.html" title="Base class for state attributes.">StateAttribute</a>. <a href="#a7da30e0f5f94c250c025718c6cdaffce"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#adb01780109d60966484c48a65af2d873">setConstantColor</a> (const <a class="el" href="a01074.html">osg::Vec4</a> &color)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a01074.html">osg::Vec4</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a6eec76ea14c3349615b5d6158b96d6f9">getConstantColor</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a01074.html">osg::Vec4</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a251ed5cca5df5522166323c97cf2e822">getConstantColor</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#aea01fd8c22d4b56d738f23efeb4d45eb">apply</a> (<a class="el" href="a00742.html">State</a> &state) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">apply the OpenGL state attributes. <a href="#aea01fd8c22d4b56d738f23efeb4d45eb"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00270.html">Extensions</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a100ceee4cb2037e4ec95ef5412efef19">getExtensions</a> (unsigned int contextID, bool createIfNotInitalized)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the <a class="el" href="a00270.html" title="Encapsulates queries of extension availability, obtains extension function pointers, and provides convenience wrappers for calling extension functions.">Extensions</a> object for the given context. <a href="#a100ceee4cb2037e4ec95ef5412efef19"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a65bd3ce69531381a79fc9763ecb0f581">setExtensions</a> (unsigned int contextID, <a class="el" href="a00270.html">Extensions</a> *extensions)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="a00057.html#a65bd3ce69531381a79fc9763ecb0f581" title="setExtensions() allows users to override the extensions across graphics contexts.">setExtensions()</a> allows users to override the extensions across graphics contexts. <a href="#a65bd3ce69531381a79fc9763ecb0f581"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a622498b100d11984d5aef3058937be93">~BlendColor</a> ()</td></tr> <tr><td colspan="2"><h2><a name="pro-attribs"></a> Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a01074.html">osg::Vec4</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a6c63021fe7bc20443620b4c079dad8a8">_constantColor</a></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Encapsulates OpenGL blend/transparency state. </p> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a2681e7478424b0f3922e8ece9567ce68"></a><!-- doxytag: member="osg::BlendColor::BlendColor" ref="a2681e7478424b0f3922e8ece9567ce68" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">osg::BlendColor::BlendColor </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="aac21c1417b8f5c25d5608eaeb299bb21"></a><!-- doxytag: member="osg::BlendColor::BlendColor" ref="aac21c1417b8f5c25d5608eaeb299bb21" args="(const osg::Vec4 &constantColor)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">osg::BlendColor::BlendColor </td> <td>(</td> <td class="paramtype">const <a class="el" href="a01074.html">osg::Vec4</a> & </td> <td class="paramname"><em>constantColor</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a46ecdf92f7bd5bd958cacb1191b35dae"></a><!-- doxytag: member="osg::BlendColor::BlendColor" ref="a46ecdf92f7bd5bd958cacb1191b35dae" args="(const BlendColor &trans, const CopyOp &copyop=CopyOp::SHALLOW_COPY)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">osg::BlendColor::BlendColor </td> <td>(</td> <td class="paramtype">const <a class="el" href="a00057.html">BlendColor</a> & </td> <td class="paramname"><em>trans</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="a00169.html">CopyOp</a> & </td> <td class="paramname"><em>copyop</em> = <code>CopyOp::SHALLOW_COPY</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Copy constructor using <a class="el" href="a00169.html" title="Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...">CopyOp</a> to manage deep vs shallow copy. </p> </div> </div> <a class="anchor" id="a622498b100d11984d5aef3058937be93"></a><!-- doxytag: member="osg::BlendColor::~BlendColor" ref="a622498b100d11984d5aef3058937be93" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual osg::BlendColor::~BlendColor </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="aea01fd8c22d4b56d738f23efeb4d45eb"></a><!-- doxytag: member="osg::BlendColor::apply" ref="aea01fd8c22d4b56d738f23efeb4d45eb" args="(State &state) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void osg::BlendColor::apply </td> <td>(</td> <td class="paramtype"><a class="el" href="a00742.html">State</a> & </td> <td class="paramname"></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>apply the OpenGL state attributes. </p> <p>The render info for the current OpenGL context is passed in to allow the <a class="el" href="a00743.html" title="Base class for state attributes.">StateAttribute</a> to obtain details on the the current context and state. </p> <p>Reimplemented from <a class="el" href="a00743.html#a579c9e2646b207f66acb7dc8653e9d75">osg::StateAttribute</a>.</p> </div> </div> <a class="anchor" id="aa18d3a9964870597d823d04d09365ffa"></a><!-- doxytag: member="osg::BlendColor::compare" ref="aa18d3a9964870597d823d04d09365ffa" args="(const StateAttribute &sa) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual int osg::BlendColor::compare </td> <td>(</td> <td class="paramtype">const <a class="el" href="a00743.html">StateAttribute</a> & </td> <td class="paramname"><em>sa</em></td><td>)</td> <td> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. </p> <p>Implements <a class="el" href="a00743.html#a0ff33c0a11fc2e9980805b4d0325e16f">osg::StateAttribute</a>.</p> <p>References <a class="el" href="a01248.html#a71201dd0137c66f15ce6742478c5b3e0">COMPARE_StateAttribute_Parameter</a>, and <a class="el" href="a01248.html#aac09eac41cba49d7203ecc64b7aec9a9">COMPARE_StateAttribute_Types</a>.</p> </div> </div> <a class="anchor" id="a6eec76ea14c3349615b5d6158b96d6f9"></a><!-- doxytag: member="osg::BlendColor::getConstantColor" ref="a6eec76ea14c3349615b5d6158b96d6f9" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a01074.html">osg::Vec4</a>& osg::BlendColor::getConstantColor </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a251ed5cca5df5522166323c97cf2e822"></a><!-- doxytag: member="osg::BlendColor::getConstantColor" ref="a251ed5cca5df5522166323c97cf2e822" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="a01074.html">osg::Vec4</a>& osg::BlendColor::getConstantColor </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a100ceee4cb2037e4ec95ef5412efef19"></a><!-- doxytag: member="osg::BlendColor::getExtensions" ref="a100ceee4cb2037e4ec95ef5412efef19" args="(unsigned int contextID, bool createIfNotInitalized)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="a00270.html">Extensions</a>* osg::BlendColor::getExtensions </td> <td>(</td> <td class="paramtype">unsigned int </td> <td class="paramname"><em>contextID</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>createIfNotInitalized</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the <a class="el" href="a00270.html" title="Encapsulates queries of extension availability, obtains extension function pointers, and provides convenience wrappers for calling extension functions.">Extensions</a> object for the given context. </p> <p>If createIfNotInitalized is true and the <a class="el" href="a00270.html" title="Encapsulates queries of extension availability, obtains extension function pointers, and provides convenience wrappers for calling extension functions.">Extensions</a> object doesn't exist, <a class="el" href="a00057.html#a100ceee4cb2037e4ec95ef5412efef19" title="Returns the Extensions object for the given context.">getExtensions()</a> creates it on the given context. Returns NULL if createIfNotInitalized is false and the <a class="el" href="a00270.html" title="Encapsulates queries of extension availability, obtains extension function pointers, and provides convenience wrappers for calling extension functions.">Extensions</a> object doesn't exist. </p> </div> </div> <a class="anchor" id="a7da30e0f5f94c250c025718c6cdaffce"></a><!-- doxytag: member="osg::BlendColor::getModeUsage" ref="a7da30e0f5f94c250c025718c6cdaffce" args="(StateAttribute::ModeUsage &usage) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool osg::BlendColor::getModeUsage </td> <td>(</td> <td class="paramtype"><a class="el" href="a00475.html">StateAttribute::ModeUsage</a> & </td> <td class="paramname"></td><td>)</td> <td> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return the modes associated with this <a class="el" href="a00743.html" title="Base class for state attributes.">StateAttribute</a>. </p> <p>Reimplemented from <a class="el" href="a00743.html#a1d6ef6841d265e7ac4164e9128bd0338">osg::StateAttribute</a>.</p> <p>References <a class="el" href="a00475.html#ac1ae7f8c6abbd07eb355592f5bd2b65a">osg::StateAttribute::ModeUsage::usesMode()</a>.</p> </div> </div> <a class="anchor" id="aa8c4b7776046f1f1e7dad4555ba7ef1f"></a><!-- doxytag: member="osg::BlendColor::META_StateAttribute" ref="aa8c4b7776046f1f1e7dad4555ba7ef1f" args="(osg, BlendColor, BLENDCOLOR)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">osg::BlendColor::META_StateAttribute </td> <td>(</td> <td class="paramtype">osg </td> <td class="paramname">, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00057.html">BlendColor</a> </td> <td class="paramname">, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">BLENDCOLOR </td> <td class="paramname"> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="adb01780109d60966484c48a65af2d873"></a><!-- doxytag: member="osg::BlendColor::setConstantColor" ref="adb01780109d60966484c48a65af2d873" args="(const osg::Vec4 &color)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void osg::BlendColor::setConstantColor </td> <td>(</td> <td class="paramtype">const <a class="el" href="a01074.html">osg::Vec4</a> & </td> <td class="paramname"><em>color</em></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a65bd3ce69531381a79fc9763ecb0f581"></a><!-- doxytag: member="osg::BlendColor::setExtensions" ref="a65bd3ce69531381a79fc9763ecb0f581" args="(unsigned int contextID, Extensions *extensions)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void osg::BlendColor::setExtensions </td> <td>(</td> <td class="paramtype">unsigned int </td> <td class="paramname"><em>contextID</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00270.html">Extensions</a> * </td> <td class="paramname"><em>extensions</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p><a class="el" href="a00057.html#a65bd3ce69531381a79fc9763ecb0f581" title="setExtensions() allows users to override the extensions across graphics contexts.">setExtensions()</a> allows users to override the extensions across graphics contexts. </p> <p>Typically used when you have different extensions supported across graphics pipes, but need to ensure that they all use the same low common denominator extensions. </p> </div> </div> <hr/><h2>Member Data Documentation</h2> <a class="anchor" id="a6c63021fe7bc20443620b4c079dad8a8"></a><!-- doxytag: member="osg::BlendColor::_constantColor" ref="a6c63021fe7bc20443620b4c079dad8a8" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a01074.html">osg::Vec4</a> <a class="el" href="a00057.html#a6c63021fe7bc20443620b4c079dad8a8">osg::BlendColor::_constantColor</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>osg/<a class="el" href="a01123.html">BlendColor</a></li> </ul> </div> <hr> <table border="0"><tr><td> <img src="osg32-32.png" alt="osg logo" /> </td><td> <address><small>Generated at Tue May 31 2011 04:19:32 for the <a href="http://www.openscenegraph.org/">OpenSceneGraph</a> by <a href="http://www.doxygen.org">doxygen</a> 1.7.4.</small></address> <!-- Dimitri van Heesch's e-mail address removed, lest he get messages on the OpenSceneGraph --> </td></tr></table> </body> </html>