%PDF- %PDF-
Direktori : /usr/share/doc/imath-devel/html/functions/ |
Current File : //usr/share/doc/imath-devel/html/functions/gl.html |
<!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>GL Functions — Imath Documentation</title> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="../_static/bizstyle.css" type="text/css" /> <script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> <script src="../_static/jquery.js"></script> <script src="../_static/underscore.js"></script> <script src="../_static/doctools.js"></script> <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> <script src="../_static/bizstyle.js"></script> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="GLU Functions" href="glu.html" /> <link rel="prev" title="Frame Functions" href="frame.html" /> <meta name="viewport" content="width=device-width,initial-scale=1.0" /> <!--[if lt IE 9]> <script src="_static/css3-mediaqueries.js"></script> <![endif]--> </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="glu.html" title="GLU Functions" accesskey="N">next</a> |</li> <li class="right" > <a href="frame.html" title="Frame Functions" accesskey="P">previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Imath</a> »</li> <li class="nav-item nav-item-this"><a href="">GL Functions</a></li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="gl-functions"> <span id="id1"></span><h1>GL Functions<a class="headerlink" href="#gl-functions" title="Permalink to this headline">¶</a></h1> <p>Functions that wrap OpenGL calls to accept Imath vectors and matrices.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">#include <Imath/ImathGL.h></span> </pre></div> </div> <p>Example:</p> <div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="cp">#include</span> <span class="cpf"><Imath/ImathGL.h></span><span class="cp"></span> <span class="kt">void</span> <span class="nf">gl_example</span><span class="p">()</span> <span class="p">{</span> <span class="n">Imath</span><span class="o">::</span><span class="n">M44f</span> <span class="n">M</span><span class="p">;</span> <span class="n">glPushMatrix</span> <span class="p">(</span><span class="n">M</span><span class="p">);</span> <span class="n">Imath</span><span class="o">::</span><span class="n">V3f</span> <span class="n">v</span> <span class="p">(</span><span class="mf">0.0f</span><span class="p">,</span> <span class="mf">1.0f</span><span class="p">,</span> <span class="mf">2.0f</span><span class="p">);</span> <span class="n">glVertex</span> <span class="p">(</span><span class="n">v</span><span class="p">);</span> <span class="p">}</span> </pre></div> </div> <dl class="cpp function"> <dt id="_CPPv48glVertexRKN5Imath3V2fE"> <span id="_CPPv38glVertexRKN5Imath3V2fE"></span><span id="_CPPv28glVertexRKN5Imath3V2fE"></span><span id="glVertex__Imath::V2fCR"></span><span class="target" id="_imath_g_l_8h_1ad825cd3be968ce2f93bc19cc4ac112b9"></span><em class="property">inline</em> void <code class="sig-name descname">glVertex</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Vec2.html#_CPPv4N5Imath3V2fE" title="Imath::V2f">V2f</a> &<em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv48glVertexRKN5Imath3V2fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glVertex2f. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv48glVertexRKN5Imath3V3fE"> <span id="_CPPv38glVertexRKN5Imath3V3fE"></span><span id="_CPPv28glVertexRKN5Imath3V3fE"></span><span id="glVertex__Imath::V3fCR"></span><span class="target" id="_imath_g_l_8h_1aafc1d351214f86b66bfbe1de5a7f73e1"></span><em class="property">inline</em> void <code class="sig-name descname">glVertex</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Vec3.html#_CPPv4N5Imath3V3fE" title="Imath::V3f">V3f</a> &<em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv48glVertexRKN5Imath3V3fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glVertex3f. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv48glNormalRKN5Imath3V3fE"> <span id="_CPPv38glNormalRKN5Imath3V3fE"></span><span id="_CPPv28glNormalRKN5Imath3V3fE"></span><span id="glNormal__Imath::V3fCR"></span><span class="target" id="_imath_g_l_8h_1a450754dc3d75e6c3a786bd0d5d26204f"></span><em class="property">inline</em> void <code class="sig-name descname">glNormal</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Vec3.html#_CPPv4N5Imath3V3fE" title="Imath::V3f">V3f</a> &<em>n</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv48glNormalRKN5Imath3V3fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glNormal3f. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv47glColorRKN5Imath3V3fE"> <span id="_CPPv37glColorRKN5Imath3V3fE"></span><span id="_CPPv27glColorRKN5Imath3V3fE"></span><span id="glColor__Imath::V3fCR"></span><span class="target" id="_imath_g_l_8h_1aab9b4b918aa0a3765076108cac8caf14"></span><em class="property">inline</em> void <code class="sig-name descname">glColor</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Vec3.html#_CPPv4N5Imath3V3fE" title="Imath::V3f">V3f</a> &<em>c</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv47glColorRKN5Imath3V3fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glColor3f. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv411glTranslateRKN5Imath3V3fE"> <span id="_CPPv311glTranslateRKN5Imath3V3fE"></span><span id="_CPPv211glTranslateRKN5Imath3V3fE"></span><span id="glTranslate__Imath::V3fCR"></span><span class="target" id="_imath_g_l_8h_1a9270ab8b9c9a7fa3e9137a695ea900fd"></span><em class="property">inline</em> void <code class="sig-name descname">glTranslate</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Vec3.html#_CPPv4N5Imath3V3fE" title="Imath::V3f">V3f</a> &<em>t</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv411glTranslateRKN5Imath3V3fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glTranslatef. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv410glTexCoordRKN5Imath3V2fE"> <span id="_CPPv310glTexCoordRKN5Imath3V2fE"></span><span id="_CPPv210glTexCoordRKN5Imath3V2fE"></span><span id="glTexCoord__Imath::V2fCR"></span><span class="target" id="_imath_g_l_8h_1ad9260113b26f58e71588a53cc2e1f95c"></span><em class="property">inline</em> void <code class="sig-name descname">glTexCoord</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Vec2.html#_CPPv4N5Imath3V2fE" title="Imath::V2f">V2f</a> &<em>t</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv410glTexCoordRKN5Imath3V2fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glTexCoord2f. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv414throwBadMatrixRKN5Imath4M44fE"> <span id="_CPPv314throwBadMatrixRKN5Imath4M44fE"></span><span id="_CPPv214throwBadMatrixRKN5Imath4M44fE"></span><span id="throwBadMatrix__Imath::M44fCR"></span><span class="target" id="_imath_g_l_8h_1a2626cebd9ca94173d06b36c1367ab630"></span><em class="property">inline</em> void <code class="sig-name descname">throwBadMatrix</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Matrix44.html#_CPPv4N5Imath4M44fE" title="Imath::M44f">M44f</a> &<em>m</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv414throwBadMatrixRKN5Imath4M44fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Throw an exception if m is not a valid matrix for GL. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv412glMultMatrixRKN5Imath4M44fE"> <span id="_CPPv312glMultMatrixRKN5Imath4M44fE"></span><span id="_CPPv212glMultMatrixRKN5Imath4M44fE"></span><span id="glMultMatrix__Imath::M44fCR"></span><span class="target" id="_imath_g_l_8h_1a893362bbac59a1e7c30d347609dc4faa"></span><em class="property">inline</em> void <code class="sig-name descname">glMultMatrix</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Matrix44.html#_CPPv4N5Imath4M44fE" title="Imath::M44f">M44f</a> &<em>m</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv412glMultMatrixRKN5Imath4M44fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glMultmatrixf. Throw an exception if m is not a valid matrix for GL. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv412glMultMatrixPKN5Imath4M44fE"> <span id="_CPPv312glMultMatrixPKN5Imath4M44fE"></span><span id="_CPPv212glMultMatrixPKN5Imath4M44fE"></span><span id="glMultMatrix__Imath::M44fCP"></span><span class="target" id="_imath_g_l_8h_1aae734b5faed48a2c951a9839c5fab7cc"></span><em class="property">inline</em> void <code class="sig-name descname">glMultMatrix</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Matrix44.html#_CPPv4N5Imath4M44fE" title="Imath::M44f">M44f</a> *<em>m</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv412glMultMatrixPKN5Imath4M44fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glMultmatrixf. Throw an exception if m is not a valid matrix for GL. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv412glLoadMatrixRKN5Imath4M44fE"> <span id="_CPPv312glLoadMatrixRKN5Imath4M44fE"></span><span id="_CPPv212glLoadMatrixRKN5Imath4M44fE"></span><span id="glLoadMatrix__Imath::M44fCR"></span><span class="target" id="_imath_g_l_8h_1aaa718911e4745e32882aab4a5feca8b5"></span><em class="property">inline</em> void <code class="sig-name descname">glLoadMatrix</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Matrix44.html#_CPPv4N5Imath4M44fE" title="Imath::M44f">M44f</a> &<em>m</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv412glLoadMatrixRKN5Imath4M44fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glLoadmatrixf. Throw an exception if m is not a valid matrix for GL. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv412glLoadMatrixPKN5Imath4M44fE"> <span id="_CPPv312glLoadMatrixPKN5Imath4M44fE"></span><span id="_CPPv212glLoadMatrixPKN5Imath4M44fE"></span><span id="glLoadMatrix__Imath::M44fCP"></span><span class="target" id="_imath_g_l_8h_1a7d3337e50b4442c67ebc8b330a5fbc49"></span><em class="property">inline</em> void <code class="sig-name descname">glLoadMatrix</code><span class="sig-paren">(</span><em class="property">const</em> Imath::<a class="reference internal" href="../classes/Matrix44.html#_CPPv4N5Imath4M44fE" title="Imath::M44f">M44f</a> *<em>m</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv412glLoadMatrixPKN5Imath4M44fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glLoadmatrixf. Throw an exception if m is not a valid matrix for GL. </p> </dd></dl> <dl class="cpp class"> <dt id="_CPPv4N5Imath12GLPushMatrixE"> <span id="_CPPv3N5Imath12GLPushMatrixE"></span><span id="_CPPv2N5Imath12GLPushMatrixE"></span><span id="Imath::GLPushMatrix"></span><span class="target" id="class_imath_1_1_g_l_push_matrix"></span><em class="property">class </em><code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">GLPushMatrix</code><a class="headerlink" href="#_CPPv4N5Imath12GLPushMatrixE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>A class object that pushes/pops the GL matrix. </p> <p>This object assists with proper cleanup of the state when exceptions are thrown. </p> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Public Functions</p> <dl class="cpp function"> <dt id="_CPPv4N5Imath12GLPushMatrix12GLPushMatrixEv"> <span id="_CPPv3N5Imath12GLPushMatrix12GLPushMatrixEv"></span><span id="_CPPv2N5Imath12GLPushMatrix12GLPushMatrixEv"></span><span id="Imath::GLPushMatrix::GLPushMatrix"></span><span class="target" id="class_imath_1_1_g_l_push_matrix_1a0504dba11928ac59bc0b5f741caf9b72"></span><em class="property">inline</em> <code class="sig-name descname">GLPushMatrix</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N5Imath12GLPushMatrix12GLPushMatrixEv" title="Permalink to this definition">¶</a><br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath12GLPushMatrixD0Ev"> <span id="_CPPv3N5Imath12GLPushMatrixD0Ev"></span><span id="_CPPv2N5Imath12GLPushMatrixD0Ev"></span><span id="Imath::GLPushMatrix::~GLPushMatrix"></span><span class="target" id="class_imath_1_1_g_l_push_matrix_1a22472ef6ed0f188d76e83eeb8ba2a0a0"></span><em class="property">inline</em> <code class="sig-name descname">~GLPushMatrix</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N5Imath12GLPushMatrixD0Ev" title="Permalink to this definition">¶</a><br /></dt> <dd></dd></dl> </div> </dd></dl> <dl class="cpp class"> <dt id="_CPPv4N5Imath12GLPushAttribE"> <span id="_CPPv3N5Imath12GLPushAttribE"></span><span id="_CPPv2N5Imath12GLPushAttribE"></span><span id="Imath::GLPushAttrib"></span><span class="target" id="class_imath_1_1_g_l_push_attrib"></span><em class="property">class </em><code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">GLPushAttrib</code><a class="headerlink" href="#_CPPv4N5Imath12GLPushAttribE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>A class object that pushes/pops the current GL attribute state. </p> <p>This object assists with proper cleanup of the state when exceptions are thrown. </p> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Public Functions</p> <dl class="cpp function"> <dt id="_CPPv4N5Imath12GLPushAttrib12GLPushAttribE10GLbitfield"> <span id="_CPPv3N5Imath12GLPushAttrib12GLPushAttribE10GLbitfield"></span><span id="_CPPv2N5Imath12GLPushAttrib12GLPushAttribE10GLbitfield"></span><span id="Imath::GLPushAttrib::GLPushAttrib__GLbitfield"></span><span class="target" id="class_imath_1_1_g_l_push_attrib_1a3798641d86b973db2177b1b5788f7511"></span><em class="property">inline</em> <code class="sig-name descname">GLPushAttrib</code><span class="sig-paren">(</span>GLbitfield <em>mask</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N5Imath12GLPushAttrib12GLPushAttribE10GLbitfield" title="Permalink to this definition">¶</a><br /></dt> <dd><p>call glPushAttrib() </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath12GLPushAttribD0Ev"> <span id="_CPPv3N5Imath12GLPushAttribD0Ev"></span><span id="_CPPv2N5Imath12GLPushAttribD0Ev"></span><span id="Imath::GLPushAttrib::~GLPushAttrib"></span><span class="target" id="class_imath_1_1_g_l_push_attrib_1a6b4213fb13d5ae207d8b32957d4c6cc8"></span><em class="property">inline</em> <code class="sig-name descname">~GLPushAttrib</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N5Imath12GLPushAttribD0Ev" title="Permalink to this definition">¶</a><br /></dt> <dd><p>call glPopAttrib() </p> </dd></dl> </div> </dd></dl> <dl class="cpp class"> <dt id="_CPPv4N5Imath7GLBeginE"> <span id="_CPPv3N5Imath7GLBeginE"></span><span id="_CPPv2N5Imath7GLBeginE"></span><span id="Imath::GLBegin"></span><span class="target" id="class_imath_1_1_g_l_begin"></span><em class="property">class </em><code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">GLBegin</code><a class="headerlink" href="#_CPPv4N5Imath7GLBeginE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>A class object that wraps glBegin/glEnd. </p> <p>The constructor calls glBegin(). The destructor calls glEnd(). </p> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Public Functions</p> <dl class="cpp function"> <dt id="_CPPv4N5Imath7GLBegin7GLBeginE6GLenum"> <span id="_CPPv3N5Imath7GLBegin7GLBeginE6GLenum"></span><span id="_CPPv2N5Imath7GLBegin7GLBeginE6GLenum"></span><span id="Imath::GLBegin::GLBegin__GLenum"></span><span class="target" id="class_imath_1_1_g_l_begin_1a122e5a82460667108356c79d9286e37f"></span><em class="property">inline</em> <code class="sig-name descname">GLBegin</code><span class="sig-paren">(</span>GLenum <em>mode</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N5Imath7GLBegin7GLBeginE6GLenum" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glBegin() </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath7GLBeginD0Ev"> <span id="_CPPv3N5Imath7GLBeginD0Ev"></span><span id="_CPPv2N5Imath7GLBeginD0Ev"></span><span id="Imath::GLBegin::~GLBegin"></span><span class="target" id="class_imath_1_1_g_l_begin_1a57e20353c6981652c563f704d8c5748c"></span><em class="property">inline</em> <code class="sig-name descname">~GLBegin</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N5Imath7GLBeginD0Ev" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Call glEnd() </p> </dd></dl> </div> </dd></dl> </div> <div class="clearer"></div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="../index.html"> <img class="logo" src="../_static/imath-logo-blue.png" alt="Logo"/> </a></p> <h4>Previous topic</h4> <p class="topless"><a href="frame.html" title="previous chapter">Frame Functions</a></p> <h4>Next topic</h4> <p class="topless"><a href="glu.html" title="next chapter">GLU Functions</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/functions/gl.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" /> <input type="submit" value="Go" /> </form> </div> </div> <script>$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="glu.html" title="GLU Functions" >next</a> |</li> <li class="right" > <a href="frame.html" title="Frame Functions" >previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Imath</a> »</li> <li class="nav-item nav-item-this"><a href="">GL Functions</a></li> </ul> </div> <div class="footer" role="contentinfo"> © Copyright 2021, Contributors to the OpenEXR Project. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.4.3. </div> </body> </html>