Sophie

Sophie

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

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/vtkShaderProgram2.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/vtkShaderProgram2.h</h1><a href="a03552.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: vtkShaderProgram2.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="l00024"></a>00024 <span class="preprocessor">#ifndef __vtkShaderProgram2_h</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define __vtkShaderProgram2_h</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="a02079.html">vtkObject.h</a>"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="a02168.html">vtkWeakPointer.h</a>"</span> <span class="comment">// needed for vtkWeakPointer.</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">class </span><a class="code" href="a01886.html" title="window superclass for vtkRenderWindow">vtkWindow</a>;
<a name="l00031"></a>00031 <span class="keyword">class </span><a class="code" href="a01120.html" title="OpenGL rendering window.">vtkOpenGLRenderWindow</a>;
<a name="l00032"></a>00032 <span class="keyword">class </span><a class="code" href="a01105.html" title="Interface class for querying and using OpenGL extensions.">vtkOpenGLExtensionManager</a>;
<a name="l00033"></a>00033 <span class="keyword">class </span>vtkShaderProgram2Uniforms; <span class="comment">// internal</span>
<a name="l00034"></a>00034 <span class="keyword">class </span><a class="code" href="a01534.html" title="a list of Shader2 objects.">vtkShader2Collection</a>;
<a name="l00035"></a>00035 <span class="keyword">class </span><a class="code" href="a01779.html" title="GLSL uniform variables.">vtkUniformVariables</a>;
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="comment">// Values for GetLastBuildStatus()</span>
<a name="l00038"></a><a class="code" href="a03552.html#149e8f24f6b7262f36ae631ff2682044">00038</a> <span class="keyword">enum</span> <a class="code" href="a03552.html#149e8f24f6b7262f36ae631ff2682044">vtkShaderProgram2BuildStatus</a>
<a name="l00039"></a>00039 {
<a name="l00040"></a>00040   <span class="comment">// one of the shaders failed to compile</span>
<a name="l00041"></a><a class="code" href="a03552.html#149e8f24f6b7262f36ae631ff26820446af5a91aa747bd0e8fe4eb72433c43d6">00041</a>   <a class="code" href="a03552.html#149e8f24f6b7262f36ae631ff26820446af5a91aa747bd0e8fe4eb72433c43d6">VTK_SHADER_PROGRAM2_COMPILE_FAILED</a>=0,
<a name="l00042"></a>00042   <span class="comment">// all the shaders compiled successfully but the link failed</span>
<a name="l00043"></a><a class="code" href="a03552.html#149e8f24f6b7262f36ae631ff2682044783d93f1224d9dcfd3b4c6a5619046aa">00043</a>   <a class="code" href="a03552.html#149e8f24f6b7262f36ae631ff2682044783d93f1224d9dcfd3b4c6a5619046aa">VTK_SHADER_PROGRAM2_LINK_FAILED</a>=1,
<a name="l00044"></a>00044   <span class="comment">// all the shaders compiled successfully and the link succeeded</span>
<a name="l00045"></a><a class="code" href="a03552.html#149e8f24f6b7262f36ae631ff26820445b2a23537a01b206dd4b36c5f0d378d3">00045</a>   <a class="code" href="a03552.html#149e8f24f6b7262f36ae631ff26820445b2a23537a01b206dd4b36c5f0d378d3">VTK_SHADER_PROGRAM2_LINK_SUCCEEDED</a>=2
<a name="l00046"></a>00046 };
<a name="l00047"></a>00047 
<a name="l00048"></a><a class="code" href="a01538.html">00048</a> <span class="keyword">class </span><a class="code" href="a02170.html#4019f67b2e7d601f2cf984e448308dbb">VTK_RENDERING_EXPORT</a> <a class="code" href="a01538.html" title="GLSL Program.">vtkShaderProgram2</a> : <span class="keyword">public</span> <a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a>
<a name="l00049"></a>00049 {
<a name="l00050"></a>00050 <span class="keyword">public</span>:
<a name="l00051"></a>00051   <span class="keyword">static</span> <a class="code" href="a01538.html" title="GLSL Program.">vtkShaderProgram2</a>* <a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>();
<a name="l00052"></a><a class="code" href="a01538.html#01c4bf3079a93faf3f52974557a9057f">00052</a>   vtkTypeRevisionMacro(<a class="code" href="a01538.html" title="GLSL Program.">vtkShaderProgram2</a>, <a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a>);
<a name="l00053"></a>00053   <span class="keywordtype">void</span> <a class="code" href="a01084.html#bf3dbb4154289b56a12483eee3866263">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00054"></a>00054 
<a name="l00056"></a>00056 
<a name="l00057"></a>00057   <span class="keyword">static</span> <span class="keywordtype">bool</span> IsSupported(<a class="code" href="a01120.html" title="OpenGL rendering window.">vtkOpenGLRenderWindow</a> *context);
<a name="l00058"></a>00058   <span class="keyword">static</span> <span class="keywordtype">bool</span> LoadExtensions(<a class="code" href="a01120.html" title="OpenGL rendering window.">vtkOpenGLRenderWindow</a> *context);
<a name="l00060"></a>00060   
<a name="l00062"></a>00062 
<a name="l00067"></a>00067   vtkGetMacro(PrintErrors,<span class="keywordtype">bool</span>);
<a name="l00068"></a>00068   vtkSetMacro(PrintErrors,<span class="keywordtype">bool</span>);
<a name="l00070"></a>00070   
<a name="l00072"></a>00072 
<a name="l00076"></a>00076   <span class="keywordtype">void</span> SetContext(<a class="code" href="a01120.html" title="OpenGL rendering window.">vtkOpenGLRenderWindow</a> *context);
<a name="l00077"></a>00077   vtkGetObjectMacro(Context,<a class="code" href="a01120.html" title="OpenGL rendering window.">vtkOpenGLRenderWindow</a>);
<a name="l00079"></a>00079 
<a name="l00081"></a>00081 
<a name="l00083"></a>00083   vtkGetObjectMacro(Shaders,<a class="code" href="a01534.html" title="a list of Shader2 objects.">vtkShader2Collection</a>);
<a name="l00085"></a>00085 
<a name="l00089"></a>00089   <span class="keywordtype">bool</span> HasVertexShaders();
<a name="l00090"></a>00090   
<a name="l00094"></a>00094   <span class="keywordtype">bool</span> HasFragmentShaders();
<a name="l00095"></a>00095   
<a name="l00097"></a>00097   <span class="keywordtype">bool</span> HasGeometryShaders();
<a name="l00098"></a>00098   
<a name="l00100"></a>00100   <span class="keywordtype">bool</span> IsValid();
<a name="l00101"></a>00101   
<a name="l00105"></a>00105   <span class="keywordtype">void</span> Build();
<a name="l00106"></a>00106   
<a name="l00108"></a>00108   <span class="keywordtype">void</span> SendUniforms();
<a name="l00109"></a>00109   
<a name="l00111"></a>00111 
<a name="l00113"></a>00113   <span class="keywordtype">void</span> PrintActiveUniformVariables(ostream &amp;os,
<a name="l00114"></a>00114                                    <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00116"></a>00116   
<a name="l00119"></a>00119   <span class="keywordtype">void</span> PrintActiveUniformVariablesOnCout();
<a name="l00120"></a>00120   
<a name="l00122"></a>00122   <span class="keywordtype">bool</span> IsUsed();
<a name="l00123"></a>00123   
<a name="l00128"></a>00128   <span class="keywordtype">void</span> Use();
<a name="l00129"></a>00129   
<a name="l00131"></a>00131   <span class="keywordtype">void</span> Restore();
<a name="l00132"></a>00132   
<a name="l00135"></a>00135   <span class="keywordtype">void</span> RestoreFixedPipeline();
<a name="l00136"></a>00136 
<a name="l00143"></a>00143   <span class="keywordtype">int</span> GetLastBuildStatus();
<a name="l00144"></a>00144   
<a name="l00147"></a>00147   <span class="keyword">const</span> <span class="keywordtype">char</span> *GetLastLinkLog();
<a name="l00148"></a>00148   
<a name="l00151"></a>00151   <span class="keyword">const</span> <span class="keywordtype">char</span> *GetLastValidateLog();
<a name="l00152"></a>00152   
<a name="l00154"></a>00154   <span class="keyword">virtual</span> <span class="keywordtype">void</span> ReleaseGraphicsResources();
<a name="l00155"></a>00155 
<a name="l00159"></a>00159   <span class="keywordtype">int</span> GetAttributeLocation(<span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>);
<a name="l00160"></a>00160   
<a name="l00162"></a>00162 
<a name="l00164"></a>00164   vtkGetObjectMacro(UniformVariables,<a class="code" href="a01779.html" title="GLSL uniform variables.">vtkUniformVariables</a>);
<a name="l00165"></a>00165   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetUniformVariables(<a class="code" href="a01779.html" title="GLSL uniform variables.">vtkUniformVariables</a> *variables);
<a name="l00167"></a>00167   
<a name="l00172"></a>00172   <span class="keywordtype">bool</span> DisplayListUnderCreationInCompileMode();
<a name="l00173"></a>00173   
<a name="l00174"></a>00174 <span class="keyword">protected</span>:
<a name="l00175"></a>00175   <a class="code" href="a01538.html" title="GLSL Program.">vtkShaderProgram2</a>();
<a name="l00176"></a>00176   <span class="keyword">virtual</span> ~<a class="code" href="a01538.html" title="GLSL Program.">vtkShaderProgram2</a>();
<a name="l00177"></a>00177   
<a name="l00178"></a><a class="code" href="a01538.html#99d22d25dbb58bd399a23917543dfeea">00178</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Id; <span class="comment">// actually GLuint. Initial value is 0.</span>
<a name="l00179"></a><a class="code" href="a01538.html#c612cd3af1a008cd57b3df3e4ab875a3">00179</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> SavedId;
<a name="l00180"></a>00180   
<a name="l00181"></a><a class="code" href="a01538.html#235cea44c7a2c9c3b136fd28394e7851">00181</a>   <a class="code" href="a01719.html" title="record modification and/or execution time">vtkTimeStamp</a> LastLinkTime;
<a name="l00182"></a><a class="code" href="a01538.html#f5d7828ed61ed9a9239e00f89d9785a3">00182</a>   <a class="code" href="a01719.html" title="record modification and/or execution time">vtkTimeStamp</a> LastSendUniformsTime;
<a name="l00183"></a>00183   
<a name="l00184"></a><a class="code" href="a01538.html#fb5847543c43c053bcde5619e2140c80">00184</a>   vtkShaderProgram2Uniforms *Uniforms;
<a name="l00185"></a><a class="code" href="a01538.html#d48c5aa6e579b51ba5993bb24ad6a8db">00185</a>   <a class="code" href="a01534.html" title="a list of Shader2 objects.">vtkShader2Collection</a> *Shaders;
<a name="l00186"></a>00186   
<a name="l00187"></a><a class="code" href="a01538.html#ea7e8a26376e1701cc3e8fcdb543fada">00187</a>   <span class="keywordtype">int</span> LastBuildStatus; <span class="comment">// Initial value is VTK_SHADER_PROGRAM2_COMPILE_FAILED</span>
<a name="l00188"></a>00188   
<a name="l00189"></a><a class="code" href="a01538.html#85430c02fb0d7f023c804f7431a95802">00189</a>   <span class="keywordtype">char</span> *LastLinkLog; <span class="comment">// Initial value is the empty string ""='\0'</span>
<a name="l00190"></a><a class="code" href="a01538.html#28b3f0dbbd474cae4371c869ba69374e">00190</a>   <span class="keywordtype">size_t</span> LastLinkLogCapacity; <span class="comment">// Initial value is 8.</span>
<a name="l00191"></a>00191   
<a name="l00192"></a><a class="code" href="a01538.html#97746cc1a9be6bf91f81c39a695fdae6">00192</a>   <span class="keywordtype">char</span> *LastValidateLog; <span class="comment">// Initial value is the empty string ""='\0'</span>
<a name="l00193"></a><a class="code" href="a01538.html#738782c6f55bcb758be93b52f97ed077">00193</a>   <span class="keywordtype">size_t</span> LastValidateLogCapacity; <span class="comment">// Initial value is 8.</span>
<a name="l00194"></a>00194   
<a name="l00195"></a><a class="code" href="a01538.html#30830993abfcee6f03fc5bbafd7da7e4">00195</a>   <a class="code" href="a01779.html" title="GLSL uniform variables.">vtkUniformVariables</a> *UniformVariables; <span class="comment">// Initial values is an empty list</span>
<a name="l00196"></a>00196   
<a name="l00197"></a><a class="code" href="a01538.html#4ce64f8f069d6736737bd111be3aa6ee">00197</a>   <span class="keywordtype">bool</span> PrintErrors; <span class="comment">// use vtkErrorMacro ?</span>
<a name="l00198"></a>00198   
<a name="l00199"></a><a class="code" href="a01538.html#725baa636b7e20c57ec1303a6da99f8d">00199</a>   <a class="code" href="a01120.html" title="OpenGL rendering window.">vtkOpenGLRenderWindow</a> *Context;
<a name="l00200"></a><a class="code" href="a01538.html#d21bbd86595be2c1758b73c261385178">00200</a>   <span class="keywordtype">bool</span> ExtensionsLoaded;
<a name="l00201"></a>00201   
<a name="l00202"></a>00202 <span class="keyword">private</span>:
<a name="l00203"></a>00203   <a class="code" href="a01538.html" title="GLSL Program.">vtkShaderProgram2</a>(<span class="keyword">const</span> <a class="code" href="a01538.html" title="GLSL Program.">vtkShaderProgram2</a>&amp;); <span class="comment">// Not implemented.</span>
<a name="l00204"></a>00204   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01538.html" title="GLSL Program.">vtkShaderProgram2</a>&amp;); <span class="comment">// Not implemented.</span>
<a name="l00205"></a>00205 };
<a name="l00206"></a>00206 
<a name="l00207"></a>00207 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:49 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>