Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 60f1dc962abad0f3b492991a4fbef9be > files > 5295

vtk-doc-5.4.2-5mdv2010.0.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>VTK: dox/Rendering/vtkOpenGLStateCache.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="classes.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>dox/Rendering/vtkOpenGLStateCache.h</h1><a href="a03503.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">  Program:   Visualization Toolkit</span>
<a name="l00004"></a>00004 <span class="comment">  Module:    $RCSfile: vtkOpenGLStateCache.h,v $</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span>
<a name="l00007"></a>00007 <span class="comment">  All rights reserved.</span>
<a name="l00008"></a>00008 <span class="comment">  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">     This software is distributed WITHOUT ANY WARRANTY; without even</span>
<a name="l00011"></a>00011 <span class="comment">     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span>
<a name="l00012"></a>00012 <span class="comment">     PURPOSE.  See the above copyright notice for more information.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span>
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef VTK_IMPLEMENT_MESA_CXX</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor"># include "vtkOpenGL.h"</span> <span class="comment">// Needed for GL api types.</span>
<a name="l00025"></a>00025 <span class="preprocessor">#endif</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a><a class="code" href="a03503.html#29c2dcc1a95a4a0a935c20dc10002eda">00027</a> <span class="preprocessor">#define vtkOpenGLCall_glEnable vtkOpenGLStateCache::CurrentGLCache-&gt;glEnable</span>
<a name="l00028"></a><a class="code" href="a03503.html#18efe674fc00c166b9e0386563ab1787">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glDisable vtkOpenGLStateCache::CurrentGLCache-&gt;glDisable</span>
<a name="l00029"></a><a class="code" href="a03503.html#0e25f8b114a218a947f17fe591e9e8cc">00029</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glAlphaFunc vtkOpenGLStateCache::CurrentGLCache-&gt;glAlphaFunc</span>
<a name="l00030"></a><a class="code" href="a03503.html#b8dcb485fcbdfa57eb4722a7a9657b32">00030</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glBlendFunc vtkOpenGLStateCache::CurrentGLCache-&gt;glBlendFunc</span>
<a name="l00031"></a><a class="code" href="a03503.html#4e97113fef2083e54ff0a8fac8bb5f3e">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glDepthFunc vtkOpenGLStateCache::CurrentGLCache-&gt;glDepthFunc</span>
<a name="l00032"></a><a class="code" href="a03503.html#7eace322d202fbea34ab085de88119ea">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glTexEnvf vtkOpenGLStateCache::CurrentGLCache-&gt;glTexEnvf</span>
<a name="l00033"></a><a class="code" href="a03503.html#e9f4bf61656afa54363f34c66e04fb30">00033</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glLightModeli vtkOpenGLStateCache::CurrentGLCache-&gt;glLightModeli</span>
<a name="l00034"></a><a class="code" href="a03503.html#a913fd45702bf7b756d19a6da88dd2b2">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glLightModelfv vtkOpenGLStateCache::CurrentGLCache-&gt;glLightMOdelfv</span>
<a name="l00035"></a><a class="code" href="a03503.html#30c51b80dbea070417ffebc42421d4d1">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glLightfv vtkOpenGLStateCache::CurrentGLCache-&gt;glLightfv</span>
<a name="l00036"></a><a class="code" href="a03503.html#53bb6b5c58038cdf6965c2b570c8f196">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glLightf vtkOpenGLStateCache::CurrentGLCache-&gt;glLightf</span>
<a name="l00037"></a><a class="code" href="a03503.html#af8dc2e8d3d593ce3b8c39baa9889157">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glLighti vtkOpenGLStateCache::CurrentGLCache-&gt;glLighti</span>
<a name="l00038"></a><a class="code" href="a03503.html#5e64f9b40706c1ea0848fddf68002d7a">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glMaterialfv vtkOpenGLStateCache::CurrentGLCache-&gt;glMaterialfv</span>
<a name="l00039"></a><a class="code" href="a03503.html#01ab3fbeef95d42ac72a1d5942410b1a">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glShadeModel vtkOpenGLStateCache::CurrentGLCache-&gt;glShadeModel</span>
<a name="l00040"></a><a class="code" href="a03503.html#cfca05fcb8a00998f5e01094cef3c8ce">00040</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glClearColor vtkOpenGLStateCache::CurrentGLCache-&gt;glClearColor</span>
<a name="l00041"></a><a class="code" href="a03503.html#498716cf38a1f3ce0646b44d7858013e">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glClearDepth vtkOpenGLStateCache::CurrentGLCache-&gt;glClearDepth</span>
<a name="l00042"></a><a class="code" href="a03503.html#d38b7683cfe7a3b48c87f2f646a3d4fa">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glDepthMask vtkOpenGLStateCache::CurrentGLCache-&gt;glDepthMask</span>
<a name="l00043"></a><a class="code" href="a03503.html#83a10003a6f210f3a26b50c4e06fbcca">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glCullFace vtkOpenGLStateCache::CurrentGLCache-&gt;glCullFace</span>
<a name="l00044"></a><a class="code" href="a03503.html#626b592ea480b11fbe0e04da6e34cae4">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glClear vtkOpenGLStateCache::CurrentGLCache-&gt;glClear</span>
<a name="l00045"></a><a class="code" href="a03503.html#c1d2461e56079bf375a40f61dc4cce85">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glDrawBuffer vtkOpenGLStateCache::CurrentGLCache-&gt;glDrawBuffer</span>
<a name="l00046"></a><a class="code" href="a03503.html#5cddccb597b68d391ed3c2c52a4452b3">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glMatrixMode vtkOpenGLStateCache::CurrentGLCache-&gt;glMatrixMode</span>
<a name="l00047"></a><a class="code" href="a03503.html#9137b9c01b76ce14135c8f031f84221a">00047</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glViewport vtkOpenGLStateCache::CurrentGLCache-&gt;glViewport</span>
<a name="l00048"></a><a class="code" href="a03503.html#ef86b3c57337fc8b4638496b1ffdddbe">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glScissor vtkOpenGLStateCache::CurrentGLCache-&gt;glScissor</span>
<a name="l00049"></a><a class="code" href="a03503.html#7678eaa40e3da94866dbfeb518d855b0">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glClipPlane vtkOpenGLStateCache::CurrentGLCache-&gt;glClipPlane</span>
<a name="l00050"></a><a class="code" href="a03503.html#37923c2faa0d98e4c30d40ca2a5d90b0">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glColorMaterial vtkOpenGLStateCache::CurrentGLCache-&gt;glColorMaterial</span>
<a name="l00051"></a><a class="code" href="a03503.html#554b15afcd1a12a5d8aaac523fc6e869">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glPointSize vtkOpenGLStateCache::CurrentGLCache-&gt;glPointSize</span>
<a name="l00052"></a><a class="code" href="a03503.html#cbff6d8eb67c41a1face28f8eb2e2653">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glLineWidth vtkOpenGLStateCache::CurrentGLCache-&gt;glLineWidth</span>
<a name="l00053"></a><a class="code" href="a03503.html#aea3b77fed4a3bafb0ade87b39d58462">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glLineStipple vtkOpenGLStateCache::CurrentGLCache-&gt;glLineStipple</span>
<a name="l00054"></a><a class="code" href="a03503.html#d1da18bc57d630891e1ef70dfff0a69f">00054</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glDepthRange vtkOpenGLStateCache::CurrentGLCache-&gt;glDepthRange</span>
<a name="l00055"></a><a class="code" href="a03503.html#2dddb034b44b23258119a07b752166d8">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glPolygonOffset vtkOpenGLStateCache::CurrentGLCache-&gt;glPolygonOffset</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>
<a name="l00057"></a><a class="code" href="a03503.html#6ab564015559d1147029febf233284fb">00057</a> <span class="preprocessor">#define vtkOpenGLCall_glPushMatrix glPushMatrix</span>
<a name="l00058"></a><a class="code" href="a03503.html#c795990f85e294f755913c46e758132d">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glPopMatrix glPopMatrix</span>
<a name="l00059"></a><a class="code" href="a03503.html#075365f69718b7e159711a37d8fc5bce">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glMultMatrixd glMultMatrixd</span>
<a name="l00060"></a><a class="code" href="a03503.html#bc1d9d4e93b6d07e0842bc83ec773d42">00060</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glLoadMatrixd glLoadMatrixd</span>
<a name="l00061"></a><a class="code" href="a03503.html#448b8cdbe1ad4b8559a7a1a03d9cf91f">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glLoadIdentity glLoadIdentity</span>
<a name="l00062"></a><a class="code" href="a03503.html#0bdd37958504ed677b86543466c21367">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glSelectBuffer glSelectBuffer</span>
<a name="l00063"></a><a class="code" href="a03503.html#a23ecf7bcd7997c1439c046df3cb72d9">00063</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glRenderMode glRenderMode</span>
<a name="l00064"></a><a class="code" href="a03503.html#cf28a20a8daed5dbd53a4ed005db9271">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glInitNames glInitNames</span>
<a name="l00065"></a><a class="code" href="a03503.html#1a6b579a018ee8c34d8a04121bcf2d8a">00065</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glPushName glPushName</span>
<a name="l00066"></a><a class="code" href="a03503.html#122e95265b02abddb1eb94fe72d8865b">00066</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glLoadName glLoadName</span>
<a name="l00067"></a><a class="code" href="a03503.html#76860ea9ac227785fcc665177bed3eb1">00067</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glGetIntegerv glGetIntegerv</span>
<a name="l00068"></a><a class="code" href="a03503.html#132a59ea942c63ebfbe1559a3634296b">00068</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glIsTexture glIsTexture</span>
<a name="l00069"></a><a class="code" href="a03503.html#406398cf7644f08e8fb85e58f6e2c48e">00069</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glDeleteTextures glDeleteTexture</span>
<a name="l00070"></a><a class="code" href="a03503.html#595f7660c156ddd9f6021b8e3d10296b">00070</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glGenTextures glGenTextures</span>
<a name="l00071"></a><a class="code" href="a03503.html#3aef93ebaf5783aec26400c7deff5244">00071</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glBindTexture glBindTexture</span>
<a name="l00072"></a><a class="code" href="a03503.html#05ba874dddc91ed1f4bdd5d56fbfe325">00072</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glTexParameterf glTextParameterf</span>
<a name="l00073"></a><a class="code" href="a03503.html#309becd91f2a4f9c3079f84703e9d1d9">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glTexCoord2fv glTexCoord2fv</span>
<a name="l00074"></a><a class="code" href="a03503.html#1f639224e98d78dfb09279714ca8277a">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glVertex3fv glVertex3fv</span>
<a name="l00075"></a><a class="code" href="a03503.html#7ee53edcc7a5c467b65d3f8e12dda36f">00075</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glNormal3fv glNormal3fv</span>
<a name="l00076"></a><a class="code" href="a03503.html#c4989828458fcde8f899706b148e858a">00076</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glColor3f glColor3f</span>
<a name="l00077"></a><a class="code" href="a03503.html#1cbeb3396d1c9b1010a157e794373259">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glColor4ubv glColor4ubv</span>
<a name="l00078"></a><a class="code" href="a03503.html#edf5157cb238d0520df17c24ae03b855">00078</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glColor4fv glColor4fv</span>
<a name="l00079"></a><a class="code" href="a03503.html#b587809c9fe0083537dd13d4526683a2">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glBegin glBegin</span>
<a name="l00080"></a><a class="code" href="a03503.html#83b5f7a0d537107950c14d99a896b46c">00080</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glEnd glEnd</span>
<a name="l00081"></a><a class="code" href="a03503.html#dbef229713e59411a5382a12319e2b13">00081</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glTexImage2D glTextImage2D</span>
<a name="l00082"></a><a class="code" href="a03503.html#c0a2a37fe589fc9e9df95a2aadea186b">00082</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glDeleteLists glDeleteLists</span>
<a name="l00083"></a><a class="code" href="a03503.html#d061fc44ad35f555cf0dcc062b1936b3">00083</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glIsList glIsList</span>
<a name="l00084"></a><a class="code" href="a03503.html#0dc6e11a004a68ce5894fb873a5e665a">00084</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glGenLists glGenLists</span>
<a name="l00085"></a><a class="code" href="a03503.html#fc18ae5f0b5598afdf5c2d01a951035f">00085</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glCallList glCallList</span>
<a name="l00086"></a><a class="code" href="a03503.html#e403a00d45248882d444e50951f1fa84">00086</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glReadBuffer glReadBuffer</span>
<a name="l00087"></a><a class="code" href="a03503.html#f587516ee479fdd3ab408f57572807f4">00087</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glPixelStorei glPixelStorei</span>
<a name="l00088"></a><a class="code" href="a03503.html#61e94b8dbe763053e59edfd5579fd4ad">00088</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glReadPixels glReadPixels</span>
<a name="l00089"></a><a class="code" href="a03503.html#b29dfb85964a2fe3dcedf23449d32634">00089</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glRasterPos3f glRasterPos3f</span>
<a name="l00090"></a><a class="code" href="a03503.html#a1d725dfe89fd55726e9e57013fb4e64">00090</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glDrawPixels glDrawPixels</span>
<a name="l00091"></a><a class="code" href="a03503.html#046d3247d31b274f8e7c99cbfdbd7b39">00091</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glRasterPos2f glRasterPos2f</span>
<a name="l00092"></a><a class="code" href="a03503.html#80cff2cba946fc32de9d7a8ec1fd5852">00092</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glNewList glNewList</span>
<a name="l00093"></a><a class="code" href="a03503.html#b756da6fa4f8716fc9143023c7f19792">00093</a> <span class="preprocessor"></span><span class="preprocessor">#define vtkOpenGLCall_glEndList glEndList</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span>
<a name="l00095"></a><a class="code" href="a01123.html">00095</a> <span class="keyword">class </span><a class="code" href="a01123.html" title="checks for redundancies in state-change requests">vtkOpenGLStateCache</a>  
<a name="l00096"></a>00096 {
<a name="l00097"></a>00097 <span class="keyword">public</span>:
<a name="l00098"></a><a class="code" href="a01123.html#b714b5c593bd1e6b4e89685cf53d7830">00098</a>   <span class="keyword">static</span> <a class="code" href="a01123.html" title="checks for redundancies in state-change requests">vtkOpenGLStateCache</a> *<a class="code" href="a01123.html#b714b5c593bd1e6b4e89685cf53d7830">CurrentGLCache</a>; <span class="comment">// recursive definition</span>
<a name="l00099"></a>00099 
<a name="l00100"></a>00100   <a class="code" href="a01123.html#ab59399b47da493ff9449490f5adf505">vtkOpenGLStateCache</a>(); <span class="comment">// set all members to initial values</span>
<a name="l00101"></a>00101   <a class="code" href="a01123.html#1c754559202982c2cd48f97fe8c75908">~vtkOpenGLStateCache</a>(); <span class="comment">// delete any dynamic objects</span>
<a name="l00102"></a>00102   <span class="keywordtype">void</span> <a class="code" href="a01123.html#8a75c4078d383910312a932c1ec9374c">Initialize</a>();
<a name="l00103"></a>00103 
<a name="l00104"></a>00104   <span class="comment">// GL_BLEND         = 0x0BE2</span>
<a name="l00105"></a>00105   <span class="comment">// GL_POINT_SMOOTH  = 0x0B10</span>
<a name="l00106"></a>00106   <span class="comment">// GL_LINE_SMOOTH   = 0x0B20</span>
<a name="l00107"></a>00107   <span class="comment">// GL_POLYGON_SMOOTH= 0x0B41</span>
<a name="l00108"></a>00108   <span class="comment">// GL_DEPTH_TEST    = 0x0B71</span>
<a name="l00109"></a>00109   <span class="comment">// GL_ALPHA_TEST    = 0x0BC0</span>
<a name="l00110"></a>00110   <span class="comment">// GL_TEXTURE_2D    = 0x0DE1</span>
<a name="l00111"></a>00111   <span class="comment">// GL_CLIP_PLANE0+i = 0x3000</span>
<a name="l00112"></a>00112   <span class="comment">// GL_LIGHTING      = 0x0B50</span>
<a name="l00113"></a>00113   <span class="comment">// GL_COLOR_MATERIAL= 0x0B57</span>
<a name="l00114"></a>00114   <span class="comment">// GL_NORMALIZE     = 0x0BA1</span>
<a name="l00115"></a>00115   <span class="comment">// GL_CULL_FACE     = 0x0B44</span>
<a name="l00116"></a>00116   <span class="comment">// GL_SCISSOR_TEST  = 0x0C11</span>
<a name="l00117"></a>00117   <span class="comment">// GL_POLYGON_OFFSET_FILL = 0x8037</span>
<a name="l00118"></a>00118   <span class="comment">// GL_LINE_STIPPLE  = 0x0B24</span>
<a name="l00119"></a>00119   <span class="comment">// GL_LIGHT+i       = 0x4000</span>
<a name="l00120"></a><a class="code" href="a01123.html#495e8f366bfe3c870a7b26d29d38bde4">00120</a>   <span class="keywordtype">char</span> <a class="code" href="a01123.html#495e8f366bfe3c870a7b26d29d38bde4">Enable_buckets</a>[0xDE1-0xB10+1]; <span class="comment">// 0xB10-0xDE1</span>
<a name="l00121"></a><a class="code" href="a01123.html#54687c8d854e911f2f7ee6a515d42dd6">00121</a>   <span class="keywordtype">char</span> <a class="code" href="a01123.html#54687c8d854e911f2f7ee6a515d42dd6">Enable_GL_LIGHT_buckets</a>[8]; <span class="comment">// 0x4000 + i (0&lt;i&lt;8)</span>
<a name="l00122"></a><a class="code" href="a01123.html#147a5b1dc97aede8e1a909ee8640a693">00122</a>   <span class="keywordtype">char</span> <a class="code" href="a01123.html#147a5b1dc97aede8e1a909ee8640a693">Enable_GL_CLIP_PLANE_buckets</a>[8]; <span class="comment">// 0x8000 + i (0&lt;i&lt;8)</span>
<a name="l00123"></a>00123   <span class="comment">/* Need to have special handling for disabling and enabling the </span>
<a name="l00124"></a>00124 <span class="comment">     GL_LIGHT's because they are disabling too many lights!</span>
<a name="l00125"></a>00125 <span class="comment">     need to propagate in how many lights are actually *on*</span>
<a name="l00126"></a>00126 <span class="comment">     and only apply the op to them.</span>
<a name="l00127"></a>00127 <span class="comment">   */</span>
<a name="l00128"></a><a class="code" href="a01123.html#6ad17016cb9be205198b2c3f4ef776eb">00128</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#6ad17016cb9be205198b2c3f4ef776eb">glEnable</a>(GLenum e) 
<a name="l00129"></a>00129     {
<a name="l00130"></a>00130       <span class="keyword">register</span> <span class="keywordtype">int</span> ex;
<a name="l00131"></a>00131       <span class="keyword">register</span> <span class="keywordtype">char</span> *val=0;
<a name="l00132"></a>00132       <span class="keywordflow">if</span>(e&amp;0x4000)
<a name="l00133"></a>00133         {
<a name="l00134"></a>00134         ex=e-0x4000;
<a name="l00135"></a>00135         <span class="keywordflow">if</span>(ex&lt;8) {val=<a class="code" href="a01123.html#54687c8d854e911f2f7ee6a515d42dd6">Enable_GL_LIGHT_buckets</a>+ex; }
<a name="l00136"></a>00136         }    
<a name="l00137"></a>00137       <span class="keywordflow">else</span> 
<a name="l00138"></a>00138         {
<a name="l00139"></a>00139         <span class="keywordflow">if</span>(e&amp;0x8000)
<a name="l00140"></a>00140           {
<a name="l00141"></a>00141           ex=e-0x8000;
<a name="l00142"></a>00142           <span class="keywordflow">if</span>(ex&lt;8) { val=<a class="code" href="a01123.html#147a5b1dc97aede8e1a909ee8640a693">Enable_GL_CLIP_PLANE_buckets</a>+ex; }
<a name="l00143"></a>00143           }
<a name="l00144"></a>00144         <span class="keywordflow">else</span> 
<a name="l00145"></a>00145           {
<a name="l00146"></a>00146           <span class="keywordflow">if</span>(e&gt;=0xB10 &amp;&amp; e&lt;=0xDE1)
<a name="l00147"></a>00147             {
<a name="l00148"></a>00148             ex=e-0xB10;
<a name="l00149"></a>00149             val=<a class="code" href="a01123.html#495e8f366bfe3c870a7b26d29d38bde4">Enable_buckets</a>+ex;
<a name="l00150"></a>00150             }
<a name="l00151"></a>00151           <span class="keywordflow">else</span>
<a name="l00152"></a>00152             {
<a name="l00153"></a>00153             printf(<span class="stringliteral">"Error: glEnable of 0x%X failed\n"</span>,e);
<a name="l00154"></a>00154             }
<a name="l00155"></a>00155           }
<a name="l00156"></a>00156         }
<a name="l00157"></a>00157       <span class="keywordflow">if</span>(val &amp;&amp; *val!=1)
<a name="l00158"></a>00158         {
<a name="l00159"></a>00159         *val=1;<a class="code" href="a01123.html#6ad17016cb9be205198b2c3f4ef776eb"></a>
<a name="l00160"></a>00160 <a class="code" href="a01123.html#6ad17016cb9be205198b2c3f4ef776eb">        ::glEnable</a>(e);
<a name="l00161"></a>00161         }
<a name="l00162"></a>00162     }
<a name="l00163"></a><a class="code" href="a01123.html#814c85029c7ff8af228f028a442507d2">00163</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#814c85029c7ff8af228f028a442507d2">glDisable</a>(GLenum e) 
<a name="l00164"></a>00164     {
<a name="l00165"></a>00165       <span class="keyword">register</span> <span class="keywordtype">int</span> ex;
<a name="l00166"></a>00166       <span class="keyword">register</span> <span class="keywordtype">char</span> *val=0;
<a name="l00167"></a>00167       <span class="keywordflow">if</span>(e&amp;0x4000)
<a name="l00168"></a>00168         {
<a name="l00169"></a>00169         ex=e-0x4000;
<a name="l00170"></a>00170         <span class="keywordflow">if</span>(ex&lt;8) { val=<a class="code" href="a01123.html#54687c8d854e911f2f7ee6a515d42dd6">Enable_GL_LIGHT_buckets</a>+ex; }
<a name="l00171"></a>00171         }    
<a name="l00172"></a>00172       <span class="keywordflow">else</span>
<a name="l00173"></a>00173         {
<a name="l00174"></a>00174         <span class="keywordflow">if</span>(e&amp;0x8000)
<a name="l00175"></a>00175           {
<a name="l00176"></a>00176           ex=e-0x8000;
<a name="l00177"></a>00177           <span class="keywordflow">if</span>(ex&lt;8) { val=<a class="code" href="a01123.html#147a5b1dc97aede8e1a909ee8640a693">Enable_GL_CLIP_PLANE_buckets</a>+ex; }
<a name="l00178"></a>00178           }
<a name="l00179"></a>00179         <span class="keywordflow">else</span> 
<a name="l00180"></a>00180           {
<a name="l00181"></a>00181           <span class="keywordflow">if</span>(e&gt;=0xB10 &amp;&amp; e&lt;=0xDE1)
<a name="l00182"></a>00182             {
<a name="l00183"></a>00183             ex=e-0xB10;
<a name="l00184"></a>00184             val=<a class="code" href="a01123.html#495e8f366bfe3c870a7b26d29d38bde4">Enable_buckets</a>+ex;
<a name="l00185"></a>00185             }
<a name="l00186"></a>00186           <span class="keywordflow">else</span>
<a name="l00187"></a>00187             {
<a name="l00188"></a>00188             printf(<span class="stringliteral">"Error: glEnable of 0x%X failed\n"</span>,e);
<a name="l00189"></a>00189             }
<a name="l00190"></a>00190           }
<a name="l00191"></a>00191         }
<a name="l00192"></a>00192       <span class="keywordflow">if</span>(val &amp;&amp; *val!=0)
<a name="l00193"></a>00193         {
<a name="l00194"></a>00194         *val=0;<a class="code" href="a01123.html#814c85029c7ff8af228f028a442507d2"></a>
<a name="l00195"></a>00195 <a class="code" href="a01123.html#814c85029c7ff8af228f028a442507d2">        ::glDisable</a>(e);
<a name="l00196"></a>00196         }
<a name="l00197"></a>00197     }
<a name="l00198"></a>00198   
<a name="l00199"></a>00199   <span class="comment">// GL_GREATER = 0x0204, (GLclampf) 0</span>
<a name="l00200"></a><a class="code" href="a01123.html#4e3e5d3cf33c9d0fe8f438123c76102e">00200</a>   GLclampf <a class="code" href="a01123.html#4e3e5d3cf33c9d0fe8f438123c76102e">AlphaFunc_bucket</a>;
<a name="l00201"></a><a class="code" href="a01123.html#4162f2e9545ad443972672f5f66eb305">00201</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#4162f2e9545ad443972672f5f66eb305">glAlphaFunc</a>(GLenum e,GLclampf cf) 
<a name="l00202"></a>00202     {
<a name="l00203"></a>00203       <span class="keywordflow">if</span>(e==GL_GREATER &amp;&amp; cf!=<a class="code" href="a01123.html#4e3e5d3cf33c9d0fe8f438123c76102e">AlphaFunc_bucket</a>)
<a name="l00204"></a>00204         {
<a name="l00205"></a>00205         <a class="code" href="a01123.html#4e3e5d3cf33c9d0fe8f438123c76102e">AlphaFunc_bucket</a>=cf;<a class="code" href="a01123.html#4162f2e9545ad443972672f5f66eb305"></a>
<a name="l00206"></a>00206 <a class="code" href="a01123.html#4162f2e9545ad443972672f5f66eb305">        ::glAlphaFunc</a>(e,cf);
<a name="l00207"></a>00207         }
<a name="l00208"></a>00208     }
<a name="l00209"></a>00209   
<a name="l00210"></a>00210   <span class="comment">// GL_SRC_ALPHA = 0x0302, GL_ONE_MINUS_SRC_ALPHA = 0x0303</span>
<a name="l00211"></a><a class="code" href="a01123.html#14edc4ad859bac972b5149015c036521">00211</a>   GLenum <a class="code" href="a01123.html#14edc4ad859bac972b5149015c036521">BlendFunc_bucket</a>; <span class="comment">// multibucket if any other blendfunc is used</span>
<a name="l00212"></a><a class="code" href="a01123.html#919702d1db24706781af39c6e1bf4835">00212</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#919702d1db24706781af39c6e1bf4835">glBlendFunc</a>(GLenum e,GLenum e1) 
<a name="l00213"></a>00213     {
<a name="l00214"></a>00214       <span class="keywordflow">if</span>(e==GL_SRC_ALPHA &amp;&amp; e1!=<a class="code" href="a01123.html#14edc4ad859bac972b5149015c036521">BlendFunc_bucket</a>)
<a name="l00215"></a>00215         {
<a name="l00216"></a>00216         <a class="code" href="a01123.html#14edc4ad859bac972b5149015c036521">BlendFunc_bucket</a>=e1;<a class="code" href="a01123.html#919702d1db24706781af39c6e1bf4835"></a>
<a name="l00217"></a>00217 <a class="code" href="a01123.html#919702d1db24706781af39c6e1bf4835">        ::glBlendFunc</a>(e,e1);
<a name="l00218"></a>00218         }
<a name="l00219"></a>00219     }
<a name="l00220"></a>00220   
<a name="l00221"></a>00221   <span class="comment">// GL_GREATER = 0x0204</span>
<a name="l00222"></a>00222   <span class="comment">// GL_LESS    = 0x0201</span>
<a name="l00223"></a>00223   <span class="comment">// GL_LEQUAL  = 0x0203</span>
<a name="l00224"></a><a class="code" href="a01123.html#8cd2c6b243dfb7f2b2668b36dd4b0a0e">00224</a>   GLenum <a class="code" href="a01123.html#8cd2c6b243dfb7f2b2668b36dd4b0a0e">DepthFunc_bucket</a>;
<a name="l00225"></a><a class="code" href="a01123.html#828a0c45a41407e4326ade528ea48ac1">00225</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#828a0c45a41407e4326ade528ea48ac1">glDepthFunc</a>(GLenum e) 
<a name="l00226"></a>00226     {
<a name="l00227"></a>00227       <span class="keywordflow">if</span>(e!=<a class="code" href="a01123.html#8cd2c6b243dfb7f2b2668b36dd4b0a0e">DepthFunc_bucket</a>)
<a name="l00228"></a>00228         {
<a name="l00229"></a>00229         <a class="code" href="a01123.html#8cd2c6b243dfb7f2b2668b36dd4b0a0e">DepthFunc_bucket</a>=e;<a class="code" href="a01123.html#828a0c45a41407e4326ade528ea48ac1"></a>
<a name="l00230"></a>00230 <a class="code" href="a01123.html#828a0c45a41407e4326ade528ea48ac1">        ::glDepthFunc</a>(e);
<a name="l00231"></a>00231         }
<a name="l00232"></a>00232     }
<a name="l00233"></a>00233   
<a name="l00234"></a>00234   <span class="comment">// GL_TEXTURE_ENV = 0x2300, GL_TEXTURE_ENV_MODE = 0x2200, GL_MODULATE = 0x2100</span>
<a name="l00235"></a><a class="code" href="a01123.html#bb76c4a0e3a4204dfb0a2140e7d4f6a1">00235</a>   GLfloat <a class="code" href="a01123.html#bb76c4a0e3a4204dfb0a2140e7d4f6a1">TexEnvf_MODE_bucket</a>; <span class="comment">// total kludge right now</span>
<a name="l00236"></a><a class="code" href="a01123.html#d5807d2e8e6a8138849f2002eee921f8">00236</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#d5807d2e8e6a8138849f2002eee921f8">glTexEnvf</a>(GLenum e,GLenum e1,GLfloat f) 
<a name="l00237"></a>00237     {
<a name="l00238"></a>00238       <span class="keywordflow">if</span>(e==GL_TEXTURE_ENV &amp;&amp; e1==GL_TEXTURE_ENV_MODE)
<a name="l00239"></a>00239         {
<a name="l00240"></a>00240         <span class="keywordflow">if</span>(f!=<a class="code" href="a01123.html#bb76c4a0e3a4204dfb0a2140e7d4f6a1">TexEnvf_MODE_bucket</a>)
<a name="l00241"></a>00241           {
<a name="l00242"></a>00242           <a class="code" href="a01123.html#bb76c4a0e3a4204dfb0a2140e7d4f6a1">TexEnvf_MODE_bucket</a>=f;<a class="code" href="a01123.html#d5807d2e8e6a8138849f2002eee921f8"></a>
<a name="l00243"></a>00243 <a class="code" href="a01123.html#d5807d2e8e6a8138849f2002eee921f8">          ::glTexEnvf</a>(e,e1,f);
<a name="l00244"></a>00244           }
<a name="l00245"></a>00245         }
<a name="l00246"></a>00246     }
<a name="l00247"></a>00247   
<a name="l00248"></a>00248   <span class="comment">// GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE/FALSE</span>
<a name="l00249"></a>00249   <span class="comment">// GL_LIGHT_MODEL_TWO_SIDE, 0</span>
<a name="l00250"></a><a class="code" href="a01123.html#e2a34f336b01ffc7b215e56c61bfb527">00250</a>   GLint <a class="code" href="a01123.html#e2a34f336b01ffc7b215e56c61bfb527">LightModeli_LIGHT_MODEL_TWO_SIDE_bucket</a>; <span class="comment">// shoudld check other modes</span>
<a name="l00251"></a><a class="code" href="a01123.html#352aa266245b6061e79508a500a8994b">00251</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#352aa266245b6061e79508a500a8994b">glLightModeli</a>(GLenum e,GLint i) 
<a name="l00252"></a>00252     {
<a name="l00253"></a>00253       <span class="keywordflow">if</span>(e==GL_LIGHT_MODEL_TWO_SIDE &amp;&amp; i!=<a class="code" href="a01123.html#e2a34f336b01ffc7b215e56c61bfb527">LightModeli_LIGHT_MODEL_TWO_SIDE_bucket</a>){
<a name="l00254"></a>00254       <a class="code" href="a01123.html#e2a34f336b01ffc7b215e56c61bfb527">LightModeli_LIGHT_MODEL_TWO_SIDE_bucket</a>=i;<a class="code" href="a01123.html#352aa266245b6061e79508a500a8994b"></a>
<a name="l00255"></a>00255 <a class="code" href="a01123.html#352aa266245b6061e79508a500a8994b">      ::glLightModeli</a>(e,i);
<a name="l00256"></a>00256       }
<a name="l00257"></a>00257     }
<a name="l00258"></a>00258   
<a name="l00259"></a>00259   <span class="comment">// GL_LIGHT_MODEL_AMBIENT, fvect(amb color), A=1.0</span>
<a name="l00260"></a>00260   <span class="comment">// GL_LIGHT_MODEL_AMBIENT = 0x0B53</span>
<a name="l00261"></a><a class="code" href="a01123.html#7b23ab20ed0d2be54bec405b8065c6f4">00261</a>   GLfloat <a class="code" href="a01123.html#7b23ab20ed0d2be54bec405b8065c6f4">LightModelfv_LIGHT_MODEL_AMBIENT_bucket</a>[3];
<a name="l00262"></a><a class="code" href="a01123.html#6aacbeb4799496d9cbed119e95bddd1b">00262</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#6aacbeb4799496d9cbed119e95bddd1b">glLightModelfv</a>(GLenum e,GLfloat *fv) 
<a name="l00263"></a>00263     {
<a name="l00264"></a>00264       <span class="keywordflow">if</span>(e==GL_LIGHT_MODEL_AMBIENT &amp;&amp; 
<a name="l00265"></a>00265          (fv[0]!=<a class="code" href="a01123.html#7b23ab20ed0d2be54bec405b8065c6f4">LightModelfv_LIGHT_MODEL_AMBIENT_bucket</a>[0] ||
<a name="l00266"></a>00266           fv[1]!=<a class="code" href="a01123.html#7b23ab20ed0d2be54bec405b8065c6f4">LightModelfv_LIGHT_MODEL_AMBIENT_bucket</a>[1] ||
<a name="l00267"></a>00267           fv[2]!=<a class="code" href="a01123.html#7b23ab20ed0d2be54bec405b8065c6f4">LightModelfv_LIGHT_MODEL_AMBIENT_bucket</a>[2])){
<a name="l00268"></a>00268       fv[0]=<a class="code" href="a01123.html#7b23ab20ed0d2be54bec405b8065c6f4">LightModelfv_LIGHT_MODEL_AMBIENT_bucket</a>[0];
<a name="l00269"></a>00269       fv[1]=<a class="code" href="a01123.html#7b23ab20ed0d2be54bec405b8065c6f4">LightModelfv_LIGHT_MODEL_AMBIENT_bucket</a>[1];
<a name="l00270"></a>00270       fv[2]=<a class="code" href="a01123.html#7b23ab20ed0d2be54bec405b8065c6f4">LightModelfv_LIGHT_MODEL_AMBIENT_bucket</a>[2];<a class="code" href="a01123.html#6aacbeb4799496d9cbed119e95bddd1b"> </a>
<a name="l00271"></a>00271 <a class="code" href="a01123.html#6aacbeb4799496d9cbed119e95bddd1b">      ::glLightModelfv</a>(e,fv);
<a name="l00272"></a>00272       }
<a name="l00273"></a>00273     }
<a name="l00274"></a>00274   
<a name="l00275"></a>00275   <span class="comment">// light=GL_LIGHT index</span>
<a name="l00276"></a>00276   <span class="comment">// pname= lighting type</span>
<a name="l00277"></a>00277   <span class="comment">//   GL_DIFFUSE        = 0x1201</span>
<a name="l00278"></a>00278   <span class="comment">//   GL_SPECULAR       = 0x1202</span>
<a name="l00279"></a>00279   <span class="comment">//   GL_POSITION       = 0x1203</span>
<a name="l00280"></a>00280   <span class="comment">//   GL_SPOT_DIRECTION = 0x1204</span>
<a name="l00281"></a><a class="code" href="a01123.html#e5032575ce09a7e7e27476153d6c9cc7">00281</a>   GLfloat <a class="code" href="a01123.html#e5032575ce09a7e7e27476153d6c9cc7">Lightfv_buckets</a>[8*4*8];
<a name="l00282"></a><a class="code" href="a01123.html#bcf8cbb91261cf2b8efb40de46024d1b">00282</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#bcf8cbb91261cf2b8efb40de46024d1b">glLightfv</a>( GLenum light, GLenum pname, <span class="keyword">const</span> GLfloat *params) 
<a name="l00283"></a>00283     {
<a name="l00284"></a>00284       <span class="keyword">register</span> GLfloat *val = <a class="code" href="a01123.html#e5032575ce09a7e7e27476153d6c9cc7">Lightfv_buckets</a> + ((((int)(pname-0x1201))|((<span class="keywordtype">int</span>)(light-GL_LIGHT0)&lt;&lt;3))&lt;&lt;2);
<a name="l00285"></a>00285       <span class="keywordflow">if</span>(params[0]!=val[0] ||
<a name="l00286"></a>00286          params[1]!=val[1] ||
<a name="l00287"></a>00287          params[2]!=val[2] ||
<a name="l00288"></a>00288          params[3]!=val[3])
<a name="l00289"></a>00289         {
<a name="l00290"></a>00290         val[0]=params[0];
<a name="l00291"></a>00291         val[1]=params[1];
<a name="l00292"></a>00292         val[2]=params[2];
<a name="l00293"></a>00293         val[3]=params[3];<a class="code" href="a01123.html#bcf8cbb91261cf2b8efb40de46024d1b"></a>
<a name="l00294"></a>00294 <a class="code" href="a01123.html#bcf8cbb91261cf2b8efb40de46024d1b">        ::glLightfv</a>(light,pname,params);
<a name="l00295"></a>00295         }
<a name="l00296"></a>00296     } 
<a name="l00297"></a>00297   
<a name="l00298"></a>00298   <span class="comment">// light=GL_LIGHT index</span>
<a name="l00299"></a>00299   <span class="comment">// pname= lighting parameter</span>
<a name="l00300"></a>00300   <span class="comment">//   GL_SPOT_EXPONENT        = 0x1205</span>
<a name="l00301"></a>00301   <span class="comment">//   GL_SPOT_CUTOFF          = 0x1206</span>
<a name="l00302"></a>00302   <span class="comment">//   GL_CONSTANT_ATTENUATION = 0x1207</span>
<a name="l00303"></a>00303   <span class="comment">//   GL_LINEAR_ATTENUATION   = 0x1208</span>
<a name="l00304"></a>00304   <span class="comment">//   GL_QUADRATIC_ATTENUATION= 0x1209</span>
<a name="l00305"></a><a class="code" href="a01123.html#2ed95e2ffd88bb7f339e2b094b2ac9da">00305</a>   GLfloat <a class="code" href="a01123.html#2ed95e2ffd88bb7f339e2b094b2ac9da">Lightf_buckets</a>[8*8];
<a name="l00306"></a><a class="code" href="a01123.html#7eff77bc8f7d222ed62a653e913c38c1">00306</a>   GLint <a class="code" href="a01123.html#7eff77bc8f7d222ed62a653e913c38c1">Lighti_SPOT_CUTOFF_buckets</a>[8];
<a name="l00307"></a><a class="code" href="a01123.html#40041a37ad1f424b2b6567e5fd3035e6">00307</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#40041a37ad1f424b2b6567e5fd3035e6">glLightf</a>( GLenum light, GLenum pname, GLfloat f){
<a name="l00308"></a>00308     <span class="keyword">register</span> GLfloat *val=<a class="code" href="a01123.html#2ed95e2ffd88bb7f339e2b094b2ac9da">Lightf_buckets</a>+(((int)(light-GL_LIGHT0)&lt;&lt;3)|((<span class="keywordtype">int</span>)(pname-0x1205)));
<a name="l00309"></a>00309     <span class="keywordflow">if</span>(val[0]!=f)
<a name="l00310"></a>00310       {
<a name="l00311"></a>00311       val[0]=f;<a class="code" href="a01123.html#40041a37ad1f424b2b6567e5fd3035e6"></a>
<a name="l00312"></a>00312 <a class="code" href="a01123.html#40041a37ad1f424b2b6567e5fd3035e6">      ::glLightf</a>(light,pname,f);
<a name="l00313"></a>00313       <span class="keywordflow">if</span>(pname==GL_SPOT_CUTOFF) <span class="comment">// invalidate integer spot cutoff</span>
<a name="l00314"></a>00314         <a class="code" href="a01123.html#7eff77bc8f7d222ed62a653e913c38c1">Lighti_SPOT_CUTOFF_buckets</a>[light-GL_LIGHT0]=-1;
<a name="l00315"></a>00315       }
<a name="l00316"></a>00316   }
<a name="l00317"></a>00317   
<a name="l00318"></a>00318   <span class="comment">// light=GL_LIGHT index</span>
<a name="l00319"></a>00319   <span class="comment">// pname=lighting parameter</span>
<a name="l00320"></a>00320   <span class="comment">//   GL_SPOT_CUTOFF = 0x1206</span>
<a name="l00321"></a>00321   <span class="comment">// needs to invalidate the float light cutoff</span>
<a name="l00322"></a><a class="code" href="a01123.html#51416642aabe0baec7713fe555089a59">00322</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#51416642aabe0baec7713fe555089a59">glLighti</a>( GLenum light, GLenum pname, GLint f) 
<a name="l00323"></a>00323     {
<a name="l00324"></a>00324       <span class="keywordflow">if</span>(pname==GL_SPOT_CUTOFF &amp;&amp; f!=<a class="code" href="a01123.html#7eff77bc8f7d222ed62a653e913c38c1">Lighti_SPOT_CUTOFF_buckets</a>[light-GL_LIGHT0]){
<a name="l00325"></a>00325       <a class="code" href="a01123.html#7eff77bc8f7d222ed62a653e913c38c1">Lighti_SPOT_CUTOFF_buckets</a>[light-GL_LIGHT0]=f;<a class="code" href="a01123.html#51416642aabe0baec7713fe555089a59"></a>
<a name="l00326"></a>00326 <a class="code" href="a01123.html#51416642aabe0baec7713fe555089a59">      ::glLighti</a>(light,pname,f);
<a name="l00327"></a>00327       <span class="comment">// need to invalidate the float cutoff</span>
<a name="l00328"></a>00328       <a class="code" href="a01123.html#2ed95e2ffd88bb7f339e2b094b2ac9da">Lightf_buckets</a>[((int)(light-GL_LIGHT0)&lt;&lt;3)|0x02] = -1.0f;
<a name="l00329"></a>00329       }
<a name="l00330"></a>00330     }  
<a name="l00331"></a>00331   
<a name="l00332"></a>00332   <span class="comment">// Face, GL_AMBIENT, float Info[4] </span>
<a name="l00333"></a>00333   <span class="comment">//   GL_FRONT          = 0x0404  </span>
<a name="l00334"></a>00334   <span class="comment">//   GL_BACK           = 0x0405</span>
<a name="l00335"></a>00335   <span class="comment">//   GL_FRONT_AND_BACK = 0x0408</span>
<a name="l00336"></a>00336   <span class="comment">// GL_AMBIENT   = 0x1200</span>
<a name="l00337"></a>00337   <span class="comment">// GL_DIFFUSE   = 0x1201</span>
<a name="l00338"></a>00338   <span class="comment">// GL_SPECULAR  = 0x1202</span>
<a name="l00339"></a>00339   <span class="comment">// GL_EMISSION  = 0x1600</span>
<a name="l00340"></a>00340   <span class="comment">// GL_SHININESS = 0x1601</span>
<a name="l00341"></a>00341   <span class="comment">// GL_AMBIENT_AND_DIFFUSE = 0x1602</span>
<a name="l00342"></a>00342   <span class="comment">// GL_COLOR_INDEXES       = 0x1603</span>
<a name="l00343"></a><a class="code" href="a01123.html#99a98507b49c88a12d47e9712b82e997">00343</a>   GLfloat <a class="code" href="a01123.html#99a98507b49c88a12d47e9712b82e997">Materialfv_buckets</a>[8*8*4]; 
<a name="l00344"></a><a class="code" href="a01123.html#99741bf13096d75371e6154235a8b9ad">00344</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#99741bf13096d75371e6154235a8b9ad">glMaterialfv</a>(GLenum <a class="code" href="a00012.html">face</a>, GLenum pname, <span class="keyword">const</span> GLfloat *params ) 
<a name="l00345"></a>00345     {
<a name="l00346"></a>00346       <span class="keyword">register</span> <span class="keywordtype">int</span> idx;
<a name="l00347"></a>00347       <span class="keyword">register</span> GLfloat *val;
<a name="l00348"></a>00348       <span class="keywordflow">if</span>(pname&gt;=0x1600) 
<a name="l00349"></a>00349         {
<a name="l00350"></a>00350         idx=pname-0x1600 + 4; <span class="comment">// put it just past the 120x buckets</span>
<a name="l00351"></a>00351         }
<a name="l00352"></a>00352       <span class="keywordflow">else</span> 
<a name="l00353"></a>00353         {
<a name="l00354"></a>00354         idx=pname-0x1200;
<a name="l00355"></a>00355         }
<a name="l00356"></a>00356       <span class="comment">// FRONT/BACK and FRONT_AND_BACK should do both.</span>
<a name="l00357"></a>00357       <span class="comment">// or perhaps should be a separate state key?</span>
<a name="l00358"></a>00358       <span class="comment">// For now, we will treat FRONT_AND_BACK independently</span>
<a name="l00359"></a>00359       <span class="comment">// because from a practical standpoint, that's how </span>
<a name="l00360"></a>00360       <span class="comment">// it tends to get used.</span>
<a name="l00361"></a>00361       val = <a class="code" href="a01123.html#99a98507b49c88a12d47e9712b82e997">Materialfv_buckets</a> + ((((face-0x0404)&lt;&lt;3)|idx)&lt;&lt;2);
<a name="l00362"></a>00362       <span class="keywordflow">if</span>(val[0]!=params[0] ||
<a name="l00363"></a>00363          val[1]!=params[1] || 
<a name="l00364"></a>00364          val[2]!=params[2] ||
<a name="l00365"></a>00365          val[3]!=params[3])
<a name="l00366"></a>00366         {
<a name="l00367"></a>00367         val[0]=params[0];
<a name="l00368"></a>00368         val[1]=params[1];
<a name="l00369"></a>00369         val[2]=params[2];
<a name="l00370"></a>00370         val[3]=params[3];<a class="code" href="a01123.html#99741bf13096d75371e6154235a8b9ad"></a>
<a name="l00371"></a>00371 <a class="code" href="a01123.html#99741bf13096d75371e6154235a8b9ad">        ::glMaterialfv</a>(face,pname,params);
<a name="l00372"></a>00372         }
<a name="l00373"></a>00373     }
<a name="l00374"></a>00374 
<a name="l00375"></a>00375   <span class="comment">/*</span>
<a name="l00376"></a>00376 <span class="comment">    a=0;</span>
<a name="l00377"></a>00377 <span class="comment">    a|=(val[0]^params[0])</span>
<a name="l00378"></a>00378 <span class="comment">    a|=(val[1]^params[1])</span>
<a name="l00379"></a>00379 <span class="comment">    a|=(val[2]^params[2])</span>
<a name="l00380"></a>00380 <span class="comment">    a|=(val[3]^params[3])</span>
<a name="l00381"></a>00381 <span class="comment">   */</span>
<a name="l00382"></a>00382   <span class="comment">// GL_FLAT   = 0x1D00</span>
<a name="l00383"></a>00383   <span class="comment">// GL_SMOOTH = 0x1D01</span>
<a name="l00384"></a><a class="code" href="a01123.html#e7401e5dd72eb898138bbae63862c27c">00384</a>   GLenum <a class="code" href="a01123.html#e7401e5dd72eb898138bbae63862c27c">ShadeModel_bucket</a>; 
<a name="l00385"></a><a class="code" href="a01123.html#cd5a6823431f085fb9808f5fa8771318">00385</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#cd5a6823431f085fb9808f5fa8771318">glShadeModel</a>(GLenum e)
<a name="l00386"></a>00386     {
<a name="l00387"></a>00387       <span class="keywordflow">if</span>(<a class="code" href="a01123.html#e7401e5dd72eb898138bbae63862c27c">ShadeModel_bucket</a>!=e)
<a name="l00388"></a>00388         {
<a name="l00389"></a>00389         <a class="code" href="a01123.html#e7401e5dd72eb898138bbae63862c27c">ShadeModel_bucket</a>=e;<a class="code" href="a01123.html#cd5a6823431f085fb9808f5fa8771318"></a>
<a name="l00390"></a>00390 <a class="code" href="a01123.html#cd5a6823431f085fb9808f5fa8771318">        ::glShadeModel</a>(e);
<a name="l00391"></a>00391         }
<a name="l00392"></a>00392     }
<a name="l00393"></a>00393   
<a name="l00394"></a><a class="code" href="a01123.html#c07c1fdce1d3f73e8e4d573f0b4875a9">00394</a>   GLclampf <a class="code" href="a01123.html#c07c1fdce1d3f73e8e4d573f0b4875a9">ClearColor_buckets</a>[4];
<a name="l00395"></a><a class="code" href="a01123.html#d0ea0a769c5569750435847e690f3948">00395</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#d0ea0a769c5569750435847e690f3948">glClearColor</a>(GLclampf r,GLclampf g,GLclampf b,GLclampf a)
<a name="l00396"></a>00396     {
<a name="l00397"></a>00397       <span class="keyword">register</span> GLclampf *c=<a class="code" href="a01123.html#c07c1fdce1d3f73e8e4d573f0b4875a9">ClearColor_buckets</a>;
<a name="l00398"></a>00398       <span class="keywordflow">if</span>(c[0]!=r ||
<a name="l00399"></a>00399          c[1]!=g ||
<a name="l00400"></a>00400          c[2]!=b ||
<a name="l00401"></a>00401          c[3]!=a)
<a name="l00402"></a>00402         {
<a name="l00403"></a>00403         c[0]=r;
<a name="l00404"></a>00404         c[1]=g;
<a name="l00405"></a>00405         c[2]=b;
<a name="l00406"></a>00406         c[3]=a;<a class="code" href="a01123.html#d0ea0a769c5569750435847e690f3948"></a>
<a name="l00407"></a>00407 <a class="code" href="a01123.html#d0ea0a769c5569750435847e690f3948">        ::glClearColor</a>(r,g,b,a);
<a name="l00408"></a>00408         }
<a name="l00409"></a>00409     }
<a name="l00410"></a>00410   
<a name="l00411"></a><a class="code" href="a01123.html#e4c30818e35611c856f4565b0ba3cdd1">00411</a>   GLclampd <a class="code" href="a01123.html#e4c30818e35611c856f4565b0ba3cdd1">ClearDepth_bucket</a>;
<a name="l00412"></a><a class="code" href="a01123.html#7d32765288ffa6e661942c3f1f2c31b2">00412</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#7d32765288ffa6e661942c3f1f2c31b2">glClearDepth</a>(GLclampd d) 
<a name="l00413"></a>00413     { 
<a name="l00414"></a>00414       <span class="keywordflow">if</span>(d!=<a class="code" href="a01123.html#e4c30818e35611c856f4565b0ba3cdd1">ClearDepth_bucket</a>)
<a name="l00415"></a>00415         {
<a name="l00416"></a>00416         <a class="code" href="a01123.html#e4c30818e35611c856f4565b0ba3cdd1">ClearDepth_bucket</a>=d;<a class="code" href="a01123.html#7d32765288ffa6e661942c3f1f2c31b2"></a>
<a name="l00417"></a>00417 <a class="code" href="a01123.html#7d32765288ffa6e661942c3f1f2c31b2">        ::glClearDepth</a>(d);
<a name="l00418"></a>00418         }
<a name="l00419"></a>00419     }
<a name="l00420"></a>00420   
<a name="l00421"></a><a class="code" href="a01123.html#350d3fd48b5dd0223ce9cb345309caa1">00421</a>   GLclampf <a class="code" href="a01123.html#350d3fd48b5dd0223ce9cb345309caa1">DepthMask_bucket</a>;
<a name="l00422"></a><a class="code" href="a01123.html#5e8177df7adc057c7f93e44727b39b69">00422</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#5e8177df7adc057c7f93e44727b39b69">glDepthMask</a>(GLenum e)
<a name="l00423"></a>00423     {
<a name="l00424"></a>00424       <span class="keywordflow">if</span>(<a class="code" href="a01123.html#350d3fd48b5dd0223ce9cb345309caa1">DepthMask_bucket</a>!=e)
<a name="l00425"></a>00425         {
<a name="l00426"></a>00426         <a class="code" href="a01123.html#350d3fd48b5dd0223ce9cb345309caa1">DepthMask_bucket</a>=e;<a class="code" href="a01123.html#5e8177df7adc057c7f93e44727b39b69"></a>
<a name="l00427"></a>00427 <a class="code" href="a01123.html#5e8177df7adc057c7f93e44727b39b69">        ::glDepthMask</a>(e);
<a name="l00428"></a>00428         }
<a name="l00429"></a>00429     }
<a name="l00430"></a>00430   
<a name="l00431"></a>00431   <span class="comment">// GL_FRONT = 0x0404</span>
<a name="l00432"></a>00432   <span class="comment">// GL_BACK  = 0x0405</span>
<a name="l00433"></a><a class="code" href="a01123.html#43a8842100ab0775e0665ecc11a7487a">00433</a>   GLenum <a class="code" href="a01123.html#43a8842100ab0775e0665ecc11a7487a">CullFace_bucket</a>;
<a name="l00434"></a><a class="code" href="a01123.html#f17163f46f26678e61725fbd8a52876f">00434</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#f17163f46f26678e61725fbd8a52876f">glCullFace</a>(GLenum e)
<a name="l00435"></a>00435     {
<a name="l00436"></a>00436       <span class="keywordflow">if</span>(<a class="code" href="a01123.html#43a8842100ab0775e0665ecc11a7487a">CullFace_bucket</a>!=e)
<a name="l00437"></a>00437         {
<a name="l00438"></a>00438         <a class="code" href="a01123.html#43a8842100ab0775e0665ecc11a7487a">CullFace_bucket</a>=e;<a class="code" href="a01123.html#f17163f46f26678e61725fbd8a52876f"></a>
<a name="l00439"></a>00439 <a class="code" href="a01123.html#f17163f46f26678e61725fbd8a52876f">        ::glCullFace</a>(e);
<a name="l00440"></a>00440         }
<a name="l00441"></a>00441     }
<a name="l00442"></a>00442   
<a name="l00443"></a>00443   <span class="comment">// well, lets go ahead and let it clear when it wants to</span>
<a name="l00444"></a><a class="code" href="a01123.html#205e94a90036e4787c935da819fc67e7">00444</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#205e94a90036e4787c935da819fc67e7">glClear</a>(GLbitfield b) {<a class="code" href="a01123.html#205e94a90036e4787c935da819fc67e7"> ::glClear</a>(b);}
<a name="l00445"></a>00445   <span class="comment">// GL_BACK_LEFT  = 0x0402</span>
<a name="l00446"></a>00446   <span class="comment">// GL_BACK_RIGHT = 0x0403</span>
<a name="l00447"></a>00447   <span class="comment">// GL_FRONT      = 0x0404</span>
<a name="l00448"></a>00448   <span class="comment">// GL_BACK       = 0x0405</span>
<a name="l00449"></a><a class="code" href="a01123.html#05deea38487285f39e2351c0935188d8">00449</a>   GLenum <a class="code" href="a01123.html#05deea38487285f39e2351c0935188d8">DrawBuffer_bucket</a>;
<a name="l00450"></a><a class="code" href="a01123.html#e0187df0a0dfad744e2eb337ed40ef66">00450</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#e0187df0a0dfad744e2eb337ed40ef66">glDrawBuffer</a>(GLenum e) {
<a name="l00451"></a>00451     <span class="keywordflow">if</span>(e!=<a class="code" href="a01123.html#05deea38487285f39e2351c0935188d8">DrawBuffer_bucket</a>){
<a name="l00452"></a>00452       <a class="code" href="a01123.html#05deea38487285f39e2351c0935188d8">DrawBuffer_bucket</a>=e;<a class="code" href="a01123.html#e0187df0a0dfad744e2eb337ed40ef66"></a>
<a name="l00453"></a>00453 <a class="code" href="a01123.html#e0187df0a0dfad744e2eb337ed40ef66">      ::glDrawBuffer</a>(e);
<a name="l00454"></a>00454     }
<a name="l00455"></a>00455   }
<a name="l00456"></a>00456   <span class="comment">//============Matrix Ops (behave different for deferred ops)===</span>
<a name="l00457"></a>00457   <span class="comment">// GL_MODELVIEW=0x1700</span>
<a name="l00458"></a>00458   <span class="comment">// GL_PROJECTION=0x1701</span>
<a name="l00459"></a><a class="code" href="a01123.html#9a489d13c8d134f17e24aeff487bf2bb">00459</a>   GLenum  <a class="code" href="a01123.html#9a489d13c8d134f17e24aeff487bf2bb">MatrixMode_bucket</a>;
<a name="l00460"></a><a class="code" href="a01123.html#c43fc790d5627670d88ebf96e676f4cb">00460</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#c43fc790d5627670d88ebf96e676f4cb">glMatrixMode</a>(GLenum e) {
<a name="l00461"></a>00461     <span class="keywordflow">if</span>(e!=<a class="code" href="a01123.html#9a489d13c8d134f17e24aeff487bf2bb">MatrixMode_bucket</a>){
<a name="l00462"></a>00462       <a class="code" href="a01123.html#9a489d13c8d134f17e24aeff487bf2bb">MatrixMode_bucket</a>=e;<a class="code" href="a01123.html#c43fc790d5627670d88ebf96e676f4cb"></a>
<a name="l00463"></a>00463 <a class="code" href="a01123.html#c43fc790d5627670d88ebf96e676f4cb">      ::glMatrixMode</a>(e);
<a name="l00464"></a>00464     }
<a name="l00465"></a>00465   }
<a name="l00466"></a>00466 
<a name="l00467"></a><a class="code" href="a01123.html#6226fb250d249e1604accbff06e03150">00467</a>   GLint <a class="code" href="a01123.html#6226fb250d249e1604accbff06e03150">Viewport_bucket</a>[4];
<a name="l00468"></a><a class="code" href="a01123.html#d3bfb34156b6ab19f170f0d629b0e310">00468</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#d3bfb34156b6ab19f170f0d629b0e310">glViewport</a>(GLint llx,GLint lly,GLint u,GLint v){
<a name="l00469"></a>00469     <span class="keyword">register</span> GLint *val=<a class="code" href="a01123.html#6226fb250d249e1604accbff06e03150">Viewport_bucket</a>;
<a name="l00470"></a>00470     <span class="keywordflow">if</span>(val[0]!=llx ||
<a name="l00471"></a>00471        val[1]!=lly ||
<a name="l00472"></a>00472        val[2]!=u ||
<a name="l00473"></a>00473        val[3]!=v){
<a name="l00474"></a>00474       val[0]=llx;
<a name="l00475"></a>00475       val[1]=lly;
<a name="l00476"></a>00476       val[2]=u;
<a name="l00477"></a>00477       val[3]=v;<a class="code" href="a01123.html#d3bfb34156b6ab19f170f0d629b0e310"></a>
<a name="l00478"></a>00478 <a class="code" href="a01123.html#d3bfb34156b6ab19f170f0d629b0e310">      ::glViewport</a>(llx,lly,u,v);
<a name="l00479"></a>00479     }
<a name="l00480"></a>00480   }
<a name="l00481"></a>00481   <span class="comment">// only needs to be called if scissor changes (and it usually won't)</span>
<a name="l00482"></a><a class="code" href="a01123.html#80cd8445e681cc5e184caded82f9b0f1">00482</a>   GLint <a class="code" href="a01123.html#80cd8445e681cc5e184caded82f9b0f1">Scissor_bucket</a>[4];
<a name="l00483"></a><a class="code" href="a01123.html#9a8fd8d8890793bffeb334cb342cbddd">00483</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#9a8fd8d8890793bffeb334cb342cbddd">glScissor</a>(GLint llx,GLint lly,GLint u,GLint v){
<a name="l00484"></a>00484     <span class="keyword">register</span> GLint *val=<a class="code" href="a01123.html#80cd8445e681cc5e184caded82f9b0f1">Scissor_bucket</a>;
<a name="l00485"></a>00485     <span class="keywordflow">if</span>(val[0]!=llx ||
<a name="l00486"></a>00486        val[1]!=lly ||
<a name="l00487"></a>00487        val[2]!=u ||
<a name="l00488"></a>00488        val[3]!=v){
<a name="l00489"></a>00489       val[0]=llx;
<a name="l00490"></a>00490       val[1]=lly;
<a name="l00491"></a>00491       val[2]=u;
<a name="l00492"></a>00492       val[3]=v;<a class="code" href="a01123.html#9a8fd8d8890793bffeb334cb342cbddd"></a>
<a name="l00493"></a>00493 <a class="code" href="a01123.html#9a8fd8d8890793bffeb334cb342cbddd">      ::glScissor</a>(llx,lly,u,v);
<a name="l00494"></a>00494     }
<a name="l00495"></a>00495   }
<a name="l00496"></a>00496   
<a name="l00497"></a>00497   <span class="comment">// what is the order of the clip plane eqn???</span>
<a name="l00498"></a>00498   <span class="comment">// GL_CLIP_PLANE0 = 0x3000</span>
<a name="l00499"></a><a class="code" href="a01123.html#17e93bf88864a9ba75898b8a8d6cc384">00499</a>   GLdouble <a class="code" href="a01123.html#17e93bf88864a9ba75898b8a8d6cc384">ClipPlane_bucket</a>[4*GL_MAX_CLIP_PLANES];
<a name="l00500"></a><a class="code" href="a01123.html#c3d9f0d5f1ea3dfdeeb1caf6f99e165d">00500</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#c3d9f0d5f1ea3dfdeeb1caf6f99e165d">glClipPlane</a>(GLenum e,<span class="keyword">const</span> GLdouble *eqn){
<a name="l00501"></a>00501     <span class="keyword">register</span> GLdouble *val=<a class="code" href="a01123.html#17e93bf88864a9ba75898b8a8d6cc384">ClipPlane_bucket</a> + ((e-0x3000)&lt;&lt;2);
<a name="l00502"></a>00502     <span class="keywordflow">if</span>(val[0]!=eqn[0] ||
<a name="l00503"></a>00503        val[1]!=eqn[1] ||
<a name="l00504"></a>00504        val[2]!=eqn[2] ||
<a name="l00505"></a>00505        val[3]!=eqn[3]){
<a name="l00506"></a>00506       val[0]=eqn[0];
<a name="l00507"></a>00507       val[1]=eqn[1];
<a name="l00508"></a>00508       val[2]=eqn[2];
<a name="l00509"></a>00509       val[3]=eqn[3];<a class="code" href="a01123.html#c3d9f0d5f1ea3dfdeeb1caf6f99e165d"></a>
<a name="l00510"></a>00510 <a class="code" href="a01123.html#c3d9f0d5f1ea3dfdeeb1caf6f99e165d">      ::glClipPlane</a>(e,eqn);
<a name="l00511"></a>00511     }
<a name="l00512"></a>00512   }
<a name="l00513"></a>00513 
<a name="l00514"></a>00514   <span class="comment">// face= </span>
<a name="l00515"></a>00515   <span class="comment">//   GL_FRONT          = 0x0404  </span>
<a name="l00516"></a>00516   <span class="comment">//   GL_BACK           = 0x0405</span>
<a name="l00517"></a>00517   <span class="comment">//   GL_FRONT_AND_BACK = 0x0408</span>
<a name="l00518"></a><a class="code" href="a01123.html#455676c2839c4a35782466f627f90b36">00518</a>   GLenum <a class="code" href="a01123.html#455676c2839c4a35782466f627f90b36">ColorMaterial_bucket</a>[8];
<a name="l00519"></a><a class="code" href="a01123.html#c29f8bd2c0b56a5c44dd463d9d8f3239">00519</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#c29f8bd2c0b56a5c44dd463d9d8f3239">glColorMaterial</a>(GLenum <a class="code" href="a00012.html">face</a>,GLenum <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210608db9ad4c08b9eb2e8e8353b79225da">mode</a> ){
<a name="l00520"></a>00520     <span class="keyword">register</span> GLenum *val= <a class="code" href="a01123.html#455676c2839c4a35782466f627f90b36">ColorMaterial_bucket</a> + (face-0x0404);
<a name="l00521"></a>00521     <span class="keywordflow">if</span>(*val!=mode){
<a name="l00522"></a>00522       *val=mode;<a class="code" href="a01123.html#c29f8bd2c0b56a5c44dd463d9d8f3239"></a>
<a name="l00523"></a>00523 <a class="code" href="a01123.html#c29f8bd2c0b56a5c44dd463d9d8f3239">      ::glColorMaterial</a>(face,mode);
<a name="l00524"></a>00524     }
<a name="l00525"></a>00525   }
<a name="l00526"></a><a class="code" href="a01123.html#7d709979875fab290d8476b8709b5862">00526</a>   GLfloat <a class="code" href="a01123.html#7d709979875fab290d8476b8709b5862">PointSize_bucket</a>;
<a name="l00527"></a><a class="code" href="a01123.html#3a8d35c5d23342ad7423916678167c66">00527</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#3a8d35c5d23342ad7423916678167c66">glPointSize</a>(GLfloat f) {
<a name="l00528"></a>00528     <span class="keywordflow">if</span>(f!=<a class="code" href="a01123.html#7d709979875fab290d8476b8709b5862">PointSize_bucket</a>){
<a name="l00529"></a>00529       <a class="code" href="a01123.html#7d709979875fab290d8476b8709b5862">PointSize_bucket</a>=f;<a class="code" href="a01123.html#3a8d35c5d23342ad7423916678167c66"></a>
<a name="l00530"></a>00530 <a class="code" href="a01123.html#3a8d35c5d23342ad7423916678167c66">      ::glPointSize</a>(f);
<a name="l00531"></a>00531     }
<a name="l00532"></a>00532   }
<a name="l00533"></a><a class="code" href="a01123.html#75c426b0c9e13ef20426148d8fa43f6f">00533</a>   GLfloat <a class="code" href="a01123.html#75c426b0c9e13ef20426148d8fa43f6f">LineWidth_bucket</a>;
<a name="l00534"></a><a class="code" href="a01123.html#573fd96de3a57b6003d24a6901b00054">00534</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#573fd96de3a57b6003d24a6901b00054">glLineWidth</a>(GLfloat f){
<a name="l00535"></a>00535     <span class="keywordflow">if</span>(f!=<a class="code" href="a01123.html#75c426b0c9e13ef20426148d8fa43f6f">LineWidth_bucket</a>){
<a name="l00536"></a>00536       <a class="code" href="a01123.html#75c426b0c9e13ef20426148d8fa43f6f">LineWidth_bucket</a>=f;<a class="code" href="a01123.html#3a8d35c5d23342ad7423916678167c66"></a>
<a name="l00537"></a>00537 <a class="code" href="a01123.html#3a8d35c5d23342ad7423916678167c66">      ::glPointSize</a>(f);
<a name="l00538"></a>00538     }
<a name="l00539"></a>00539   }
<a name="l00540"></a><a class="code" href="a01123.html#6617d104570d81557e561d37941926ad">00540</a>   GLint <a class="code" href="a01123.html#6617d104570d81557e561d37941926ad">LineStipple_FACTOR_bucket</a>;
<a name="l00541"></a><a class="code" href="a01123.html#91314f9b32daaef52db675b1fbc6220b">00541</a>   GLushort <a class="code" href="a01123.html#91314f9b32daaef52db675b1fbc6220b">LineStipple_PATTERN_bucket</a>;
<a name="l00542"></a><a class="code" href="a01123.html#b8c054feb3350685ae620e82eb5873f1">00542</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#b8c054feb3350685ae620e82eb5873f1">glLineStipple</a>(GLint factor, GLushort pattern )
<a name="l00543"></a>00543     {
<a name="l00544"></a>00544       <span class="keywordflow">if</span>(factor!=<a class="code" href="a01123.html#6617d104570d81557e561d37941926ad">LineStipple_FACTOR_bucket</a> ||
<a name="l00545"></a>00545          pattern!=<a class="code" href="a01123.html#91314f9b32daaef52db675b1fbc6220b">LineStipple_PATTERN_bucket</a>)
<a name="l00546"></a>00546         {
<a name="l00547"></a>00547         <a class="code" href="a01123.html#6617d104570d81557e561d37941926ad">LineStipple_FACTOR_bucket</a>=factor;
<a name="l00548"></a>00548         <a class="code" href="a01123.html#91314f9b32daaef52db675b1fbc6220b">LineStipple_PATTERN_bucket</a>=pattern;<a class="code" href="a01123.html#b8c054feb3350685ae620e82eb5873f1"></a>
<a name="l00549"></a>00549 <a class="code" href="a01123.html#b8c054feb3350685ae620e82eb5873f1">        ::glLineStipple</a>(factor,pattern);
<a name="l00550"></a>00550         }
<a name="l00551"></a>00551     }
<a name="l00552"></a>00552 
<a name="l00553"></a><a class="code" href="a01123.html#b5b653a9ebb9d179fb7b751e2e4efcf6">00553</a>   GLclampd <a class="code" href="a01123.html#b5b653a9ebb9d179fb7b751e2e4efcf6">DepthRange_NEAR_bucket</a>;
<a name="l00554"></a><a class="code" href="a01123.html#7a390fedec272023a7395427e4af6f95">00554</a>   GLclampd <a class="code" href="a01123.html#7a390fedec272023a7395427e4af6f95">DepthRange_FAR_bucket</a>;
<a name="l00555"></a><a class="code" href="a01123.html#80fab5250ec0e38a51a2f9c027ba941c">00555</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a01123.html#80fab5250ec0e38a51a2f9c027ba941c">glDepthRange</a>(GLclampd nearval,GLclampd farval )
<a name="l00556"></a>00556     {
<a name="l00557"></a>00557       <span class="keywordflow">if</span>(<a class="code" href="a01123.html#b5b653a9ebb9d179fb7b751e2e4efcf6">DepthRange_NEAR_bucket</a>!=nearval ||
<a name="l00558"></a>00558          <a class="code" href="a01123.html#7a390fedec272023a7395427e4af6f95">DepthRange_FAR_bucket</a>!=farval)
<a name="l00559"></a>00559         {
<a name="l00560"></a>00560         <a class="code" href="a01123.html#b5b653a9ebb9d179fb7b751e2e4efcf6">DepthRange_NEAR_bucket</a>=nearval;
<a name="l00561"></a>00561         <a class="code" href="a01123.html#7a390fedec272023a7395427e4af6f95">DepthRange_FAR_bucket</a>=farval;<a class="code" href="a01123.html#80fab5250ec0e38a51a2f9c027ba941c"></a>
<a name="l00562"></a>00562 <a class="code" href="a01123.html#80fab5250ec0e38a51a2f9c027ba941c">        ::glDepthRange</a>(nearval,farval);
<a name="l00563"></a>00563         }
<a name="l00564"></a>00564     }
<a name="l00565"></a>00565   
<a name="l00566"></a>00566 <span class="preprocessor">#ifdef GL_VERSION_1_1</span>
<a name="l00567"></a>00567 <span class="preprocessor"></span>  <span class="comment">// enable GL_POLYGON_OFFSET_FILL = 0x8037</span>
<a name="l00568"></a>00568   GLfloat PolygonOffset_bucket[2];
<a name="l00569"></a>00569   <span class="keyword">inline</span> <span class="keywordtype">void</span> glPolygonOffset( GLfloat f,GLfloat u) {
<a name="l00570"></a>00570     <span class="keywordflow">if</span>(PolygonOffset_bucket[0]!=f ||
<a name="l00571"></a>00571        PolygonOffset_bucket[1]!=u){
<a name="l00572"></a>00572       PolygonOffset_bucket[0]=f;
<a name="l00573"></a>00573       PolygonOffset_bucket[1]=u;
<a name="l00574"></a>00574       ::glPolygonOffset(f,u);
<a name="l00575"></a>00575     }
<a name="l00576"></a>00576   }
<a name="l00577"></a>00577 <span class="preprocessor">#endif</span>
<a name="l00578"></a>00578 <span class="preprocessor"></span>};
<a name="l00579"></a>00579 
<a name="l00580"></a>00580 
<a name="l00581"></a>00581 <span class="comment">//#ifdef vtkOpenGLStateCache_Cache</span>
<a name="l00582"></a>00582 <span class="comment">//#undef vtkOpenGLStateCache_Cache</span>
<a name="l00583"></a>00583 <span class="comment">//#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:48 2009 for VTK by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>