VTK
vtkOpenGLProperty.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLProperty.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef __vtkOpenGLProperty_h
23 #define __vtkOpenGLProperty_h
24 
25 #include "vtkProperty.h"
26 
27 class vtkOpenGLRenderer;
28 class vtkShader2;
30 class vtkShaderProgram2;
32 
34 {
35 public:
36  static vtkOpenGLProperty *New();
38  virtual void PrintSelf(ostream& os, vtkIndent indent);
39 
41  void Render(vtkActor *a, vtkRenderer *ren);
42 
44  void BackfaceRender(vtkActor *a, vtkRenderer *ren);
45 
46  //BTX
48 
50  virtual void PostRender(vtkActor *a,
51  vtkRenderer *r);
53 
57  virtual void ReleaseGraphicsResources(vtkWindow *win);
58 
60 
62  vtkGetObjectMacro(PropProgram,vtkShaderProgram2);
63  void SetPropProgram(vtkShaderProgram2 *);
65 
67 
68  vtkGetObjectMacro(ShaderDeviceAdapter2,vtkGLSLShaderDeviceAdapter2);
70 
72 
73  vtkGetObjectMacro(CurrentShaderProgram2,vtkShaderProgram2);
74  //ETX
76 
78 
82  virtual void AddShaderVariable(const char *name,int numVars,int *x);
83  virtual void AddShaderVariable(const char *name,int numVars,float *x);
84  virtual void AddShaderVariable(const char *name,int numVars,double *x);
86 
87 protected:
90 
92  void LoadMultiTexturingExtensions(vtkRenderer* ren);
93 
95  virtual void ReadFrameworkMaterial();
96 
97  // Owned. Result of merging the shader program of the renderer and the
98  // PropProgram.
100 
104 
105  // Point to CachedShaderProgram2 if Shading is on and the context supports
106  // it.
108 
118 
119 
120 private:
121  vtkOpenGLProperty(const vtkOpenGLProperty&); // Not implemented.
122  void operator=(const vtkOpenGLProperty&); // Not implemented.
123 };
124 
125 #endif