27 #ifndef vtkShaderProgram2_h 
   28 #define vtkShaderProgram2_h 
   84   vtkGetMacro(PrintErrors,
bool);
 
   85   vtkSetMacro(PrintErrors,
bool);
 
  106   bool HasVertexShaders();
 
  110   bool HasTessellationControlShaders();
 
  114   bool HasTessellationEvaluationShaders();
 
  117   bool HasGeometryShaders();
 
  122   bool HasFragmentShaders();
 
  147   void PrintActiveUniformVariables(ostream &os,
 
  155   void PrintActiveUniformVariablesOnCout();
 
  178   void RestoreFixedPipeline();
 
  193   int GetLastBuildStatus();
 
  197   const char *GetLastLinkLog();
 
  201   const char *GetLastValidateLog();
 
  204   virtual void ReleaseGraphicsResources();
 
  211   int GetAttributeLocation(
const char *
name);
 
  226   bool DisplayListUnderCreationInCompileMode();
 
  239   vtkSetMacro(GeometryTypeIn,
int);
 
  240   vtkGetMacro(GeometryTypeIn,
int);
 
  251   vtkSetMacro(GeometryVerticesOut,
int);
 
  252   vtkGetMacro(GeometryVerticesOut,
int);
 
  264   vtkSetMacro(GeometryTypeOut,
int);
 
  265   vtkGetMacro(GeometryTypeOut,
int);
 
  278   int GetUniformLocation(
const char *
name);
 
  286     { this->SetUniform1f(name, &val); }
 
  288     { this->SetUniform1f(this->GetUniformLocation(name), val); }
 
  290     { this->SetUniform2f(this->GetUniformLocation(name), val); }
 
  292     { this->SetUniform3f(this->GetUniformLocation(name), val); }
 
  294     { this->SetUniform4f(this->GetUniformLocation(name), val); }
 
  298     { this->SetUniform1i(name, &val); }
 
  300     { this->SetUniform1i(this->GetUniformLocation(name), val); }
 
  302     { this->SetUniform2i(this->GetUniformLocation(name), val); }
 
  304     { this->SetUniform3i(this->GetUniformLocation(name), val); }
 
  306     { this->SetUniform4i(this->GetUniformLocation(name), val); }
 
  309     { this->SetUniform1f(loc, &val); }
 
  310   void SetUniform1f(
int loc, 
float *val);
 
  311   void SetUniform2f(
int loc, 
float *val);
 
  312   void SetUniform3f(
int loc, 
float *val);
 
  313   void SetUniform4f(
int loc, 
float *val);
 
  316     { this->SetUniform1i(loc, &val); }
 
  317   void SetUniform1i(
int loc, 
int *val);
 
  318   void SetUniform2i(
int loc, 
int *val);
 
  319   void SetUniform3i(
int loc, 
int *val);
 
  320   void SetUniform4i(
int loc, 
int *val);
 
  326   template<
typename T> 
void SetUniform1it(
const char *
name, T *
value);
 
  327   template<
typename T> 
void SetUniform2it(
const char *
name, T *
value);
 
  328   template<
typename T> 
void SetUniform3it(
const char *
name, T *
value);
 
  329   template<
typename T> 
void SetUniform4it(
const char *
name, T *
value);
 
  332   template<
typename T> 
void SetUniform1ft(
const char *
name, T *
value);
 
  333   template<
typename T> 
void SetUniform2ft(
const char *
name, T *
value);
 
  334   template<
typename T> 
void SetUniform3ft(
const char *
name, T *
value);
 
  335   template<
typename T> 
void SetUniform4ft(
const char *
name, T *
value);
 
  337   template<
typename T> 
void SetUniform1it(
int loc, T *
value);
 
  338   template<
typename T> 
void SetUniform2it(
int loc, T *
value);
 
  339   template<
typename T> 
void SetUniform3it(
int loc, T *
value);
 
  340   template<
typename T> 
void SetUniform4it(
int loc, T *
value);
 
  342   template<
typename T> 
void SetUniform1ft(
int loc, T *
value);
 
  343   template<
typename T> 
void SetUniform2ft(
int loc, T *
value);
 
  344   template<
typename T> 
void SetUniform3ft(
int loc, T *
value);
 
  345   template<
typename T> 
void SetUniform4ft(
int loc, T *
value);
 
  359   int GetUniformLocationInternal(
const char *
name);
 
  395 #define vtkShaderProgram2SetUniformCopyCastMacro(toLetter, toType, num) \ 
  396 template<typename fromType> \ 
  397 void vtkShaderProgram2::SetUniform##num##toLetter##t(const char *name, fromType *fvalues) \ 
  399   toType tvalues[num]; \ 
  400   for (int i=0; i<num; ++i) \ 
  402     tvalues[i] = static_cast<toType>(fvalues[i]); \ 
  404   this->SetUniform##num##toLetter(name, tvalues); \ 
  406 template<typename fromType> \ 
  407 void vtkShaderProgram2::SetUniform##num##toLetter##t(int location, fromType *fvalues) \ 
  409   assert(location!=-1); \ 
  410   toType tvalues[num]; \ 
  411   for (int i=0; i<num; ++i) \ 
  413     tvalues[i] = static_cast<toType>(fvalues[i]); \ 
  415   this->SetUniform##num##toLetter(location, tvalues); \ 
void SetUniform2f(const char *name, float *val)
 
void SetUniform3f(const char *name, float *val)
 
abstract base class for most VTK objects 
 
vtkTimeStamp LastLinkTime
 
size_t LastLinkLogCapacity
 
void SetUniform1f(const char *name, float *val)
 
vtkWeakPointer< vtkRenderWindow > Context
 
record modification and/or execution time 
 
void SetUniformi(const char *name, int val)
 
vtkUniformVariables * UniformVariables
 
size_t LastValidateLogCapacity
 
a list of Shader2 objects. 
 
void SetUniform3i(const char *name, int *val)
 
virtual void PrintSelf(ostream &os, vtkIndent indent)
 
a simple class to control print indentation 
 
vtkShaderProgram2GeometryInType
 
#define vtkShaderProgram2SetUniformCopyCastMacro(toLetter, toType, num)
 
#define VTKRENDERINGOPENGL_EXPORT
 
void SetUniformf(const char *name, float val)
 
void SetUniformf(int loc, float val)
 
void SetUniform4f(const char *name, float *val)
 
void SetUniform4i(const char *name, int *val)
 
vtkShaderProgram2GeometryOutType
 
Interface class for querying and using OpenGL extensions. 
 
void SetUniform2i(const char *name, int *val)
 
void SetUniformi(int loc, int val)
 
create a window for renderers to draw into 
 
void SetUniform1i(const char *name, int *val)
 
vtkShaderProgram2BuildStatus
 
vtkTimeStamp LastSendUniformsTime
 
vtkShader2Collection * Shaders