Sophie

Sophie

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

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/vtkCgShader.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/vtkCgShader.h</h1><a href="a03375.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: vtkCgShader.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="l00015"></a>00015 <span class="comment">/*</span>
<a name="l00016"></a>00016 <span class="comment"> * Copyright 2003 Sandia Corporation.</span>
<a name="l00017"></a>00017 <span class="comment"> * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive</span>
<a name="l00018"></a>00018 <span class="comment"> * license for use of this work by or on behalf of the</span>
<a name="l00019"></a>00019 <span class="comment"> * U.S. Government. Redistribution and use in source and binary forms, with</span>
<a name="l00020"></a>00020 <span class="comment"> * or without modification, are permitted provided that this Notice and any</span>
<a name="l00021"></a>00021 <span class="comment"> * statement of authorship are reproduced on all copies.</span>
<a name="l00022"></a>00022 <span class="comment"> */</span>
<a name="l00023"></a>00023 
<a name="l00092"></a>00092 <span class="preprocessor">#ifndef __vtkCgShader_h</span>
<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor">#define __vtkCgShader_h</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span>
<a name="l00095"></a>00095 <span class="preprocessor">#include "<a class="code" href="a03547.html">vtkShader.h</a>"</span>
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 <span class="keyword">class </span><a class="code" href="a00092.html" title="represents an object (geometry &amp;amp; properties) in a rendered scene">vtkActor</a>;
<a name="l00098"></a>00098 <span class="keyword">class </span><a class="code" href="a00227.html" title="a virtual camera for 3D rendering">vtkCamera</a>;
<a name="l00099"></a>00099 <span class="keyword">class </span>vtkCgShaderInternals;
<a name="l00100"></a>00100 <span class="keyword">class </span><a class="code" href="a00954.html" title="a virtual light for 3D rendering">vtkLight</a>;
<a name="l00101"></a>00101 <span class="keyword">class </span><a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a>;
<a name="l00102"></a>00102 <span class="keyword">class </span><a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a>;
<a name="l00103"></a>00103 
<a name="l00104"></a>00104 <span class="comment">// manages all shaders defined in the XML file</span>
<a name="l00105"></a>00105 <span class="comment">// especially the part about sending things to the card</span>
<a name="l00106"></a><a class="code" href="a00258.html">00106</a> <span class="keyword">class </span><a class="code" href="a02170.html#4019f67b2e7d601f2cf984e448308dbb">VTK_RENDERING_EXPORT</a> <a class="code" href="a00258.html" title="Cg Shader.">vtkCgShader</a> : <span class="keyword">public</span> <a class="code" href="a01532.html">vtkShader</a>
<a name="l00107"></a>00107 {
<a name="l00108"></a>00108 <span class="keyword">public</span>:
<a name="l00109"></a>00109   <span class="keyword">static</span> <a class="code" href="a00258.html" title="Cg Shader.">vtkCgShader</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>();
<a name="l00110"></a><a class="code" href="a00258.html#de137605c0f619b194f63f3d66c2decf">00110</a>   vtkTypeRevisionMacro(<a class="code" href="a00258.html" title="Cg Shader.">vtkCgShader</a>, <a class="code" href="a01532.html">vtkShader</a>);
<a name="l00111"></a>00111   <span class="keywordtype">void</span> <a class="code" href="a01532.html#0753943f722a8e7654a47f8a2f2f9b16">PrintSelf</a>(ostream &amp;os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00112"></a>00112  
<a name="l00113"></a>00113   <span class="comment">// Called to compile the shader code.</span>
<a name="l00114"></a>00114   <span class="comment">// The vtkShaderProgram calls this method only when</span>
<a name="l00115"></a>00115   <span class="comment">// vtkShader::IsCompiled() returns false.</span>
<a name="l00116"></a>00116   <span class="comment">// The subclasses must only compile the code in this method.</span>
<a name="l00117"></a>00117   <span class="comment">// Returns if the compile was successful.</span>
<a name="l00118"></a>00118   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01532.html#8183089056c1ac064022599e1ad1fe6f">Compile</a>();
<a name="l00119"></a>00119 
<a name="l00123"></a>00123   <span class="keyword">virtual</span> <span class="keywordtype">void</span>  <a class="code" href="a01532.html#9244170a906a5133179a5b34d0ce4aa7">Bind</a>();
<a name="l00124"></a>00124 
<a name="l00127"></a>00127   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01532.html#fe897483d82537f4c8e75ca691730d1b">Unbind</a>();
<a name="l00128"></a>00128 
<a name="l00131"></a>00131   <span class="keywordtype">void</span> ReportError();
<a name="l00132"></a>00132 
<a name="l00136"></a>00136   <span class="keywordtype">void</span> <a class="code" href="a01532.html#2fec3459ae3da55145738f9dcbbfb58e">ReleaseGraphicsResources</a>(<a class="code" href="a01886.html" title="window superclass for vtkRenderWindow">vtkWindow</a> *);
<a name="l00137"></a>00137 
<a name="l00138"></a>00138 
<a name="l00144"></a>00144   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01532.html#58199e0f8fd90fd4aa874877cb113ce1">PassShaderVariables</a>(<a class="code" href="a00092.html" title="represents an object (geometry &amp;amp; properties) in a rendered scene">vtkActor</a>* actor, <a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a>* ren);
<a name="l00145"></a>00145 <span class="comment">//BTX</span>
<a name="l00146"></a>00146 <span class="keyword">protected</span>:
<a name="l00147"></a>00147   <a class="code" href="a00258.html" title="Cg Shader.">vtkCgShader</a>();
<a name="l00148"></a>00148   ~<a class="code" href="a00258.html" title="Cg Shader.">vtkCgShader</a>();
<a name="l00149"></a>00149 
<a name="l00151"></a>00151 
<a name="l00152"></a>00152   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01532.html#d23983ed6d00f229badbb626b9f76992">SetUniformParameter</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> numValues, <span class="keyword">const</span> <span class="keywordtype">int</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>) ;
<a name="l00153"></a>00153   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01532.html#d23983ed6d00f229badbb626b9f76992">SetUniformParameter</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> numValues, <span class="keyword">const</span> <span class="keywordtype">float</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>) ;
<a name="l00154"></a>00154   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01532.html#d23983ed6d00f229badbb626b9f76992">SetUniformParameter</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> numValues, <span class="keyword">const</span> <span class="keywordtype">double</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00156"></a>00156 
<a name="l00158"></a>00158 
<a name="l00159"></a>00159   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01532.html#c0ede013e4f88764c67cfbacaac74d97">SetMatrixParameter</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> numValues, 
<a name="l00160"></a>00160     <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2101120342919d8f583cb57e39394154f33">order</a>, <span class="keyword">const</span> <span class="keywordtype">float</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00161"></a>00161   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01532.html#c0ede013e4f88764c67cfbacaac74d97">SetMatrixParameter</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keywordtype">int</span> numValues, 
<a name="l00162"></a>00162     <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2101120342919d8f583cb57e39394154f33">order</a>, <span class="keyword">const</span> <span class="keywordtype">double</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>);
<a name="l00163"></a>00163   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01532.html#c0ede013e4f88764c67cfbacaac74d97">SetMatrixParameter</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <span class="keyword">const</span> <span class="keywordtype">char</span>* state_matix_type,
<a name="l00164"></a>00164     <span class="keyword">const</span> <span class="keywordtype">char</span>* transform_type);
<a name="l00166"></a>00166 
<a name="l00167"></a>00167   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01532.html#0248f0865288e094780a0d458f68efde">SetSamplerParameter</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210c713735f1d46c2694d66e85217207be2">name</a>, <a class="code" href="a01695.html" title="handles properties associated with a texture map">vtkTexture</a>* texture,
<a name="l00168"></a>00168                                    <span class="keywordtype">int</span>);
<a name="l00169"></a>00169 
<a name="l00170"></a><a class="code" href="a00258.html#bd8d554ee2548dc9878cb7d4893d9950">00170</a>   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00259.html" title="adapter to pass generic vertex attributes to the rendering pipeline to be used in...">vtkCgShaderDeviceAdapter</a>;
<a name="l00171"></a>00171 <span class="keyword">private</span>:
<a name="l00172"></a>00172   <a class="code" href="a00258.html" title="Cg Shader.">vtkCgShader</a>(<span class="keyword">const</span> <a class="code" href="a00258.html" title="Cg Shader.">vtkCgShader</a>&amp;); <span class="comment">// Not Implemented</span>
<a name="l00173"></a>00173   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00258.html" title="Cg Shader.">vtkCgShader</a>&amp;); <span class="comment">// Not Implemented</span>
<a name="l00174"></a>00174   
<a name="l00175"></a>00175   vtkCgShaderInternals* Internals;
<a name="l00176"></a>00176 <span class="comment">//ETX</span>
<a name="l00177"></a>00177 };
<a name="l00178"></a>00178 <span class="preprocessor">#endif //_vtkCgShader_h</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:45 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>