00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00092 #ifndef __vtkCgShader_h
00093 #define __vtkCgShader_h
00094
00095 #include "vtkShader.h"
00096
00097 class vtkActor;
00098 class vtkCamera;
00099 class vtkCgShaderInternals;
00100 class vtkLight;
00101 class vtkProperty;
00102 class vtkRenderer;
00103
00104
00105
00106 class VTK_RENDERING_EXPORT vtkCgShader : public vtkShader
00107 {
00108 public:
00109 static vtkCgShader *New();
00110 vtkTypeMacro(vtkCgShader, vtkShader);
00111 void PrintSelf(ostream &os, vtkIndent indent);
00112
00113
00114
00115
00116
00117
00118 virtual int Compile();
00119
00123 virtual void Bind();
00124
00127 virtual void Unbind();
00128
00131 void ReportError();
00132
00136 void ReleaseGraphicsResources(vtkWindow *);
00137
00138
00140
00145 virtual void PassShaderVariables(vtkActor* actor, vtkRenderer* ren);
00146
00147 protected:
00148 vtkCgShader();
00149 ~vtkCgShader();
00151
00153
00154 virtual void SetUniformParameter(const char* name, int numValues, const int* value) ;
00155 virtual void SetUniformParameter(const char* name, int numValues, const float* value) ;
00156 virtual void SetUniformParameter(const char* name, int numValues, const double* value);
00158
00160
00161 virtual void SetMatrixParameter(const char* name, int numValues,
00162 int order, const float* value);
00163 virtual void SetMatrixParameter(const char* name, int numValues,
00164 int order, const double* value);
00165 virtual void SetMatrixParameter(const char* name, const char* state_matix_type,
00166 const char* transform_type);
00168
00169 virtual void SetSamplerParameter(const char* name, vtkTexture* texture,
00170 int);
00171
00172 friend class vtkCgShaderDeviceAdapter;
00173 private:
00174 vtkCgShader(const vtkCgShader&);
00175 void operator=(const vtkCgShader&);
00176
00177 vtkCgShaderInternals* Internals;
00178
00179 };
00180 #endif //_vtkCgShader_h