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;
33 
35 {
36 public:
37  static vtkOpenGLProperty *New();
39  virtual void PrintSelf(ostream& os, vtkIndent indent);
40 
42  void Render(vtkActor *a, vtkRenderer *ren);
43 
45  void BackfaceRender(vtkActor *a, vtkRenderer *ren);
46 
47  //BTX
49 
51  virtual void PostRender(vtkActor *a,
52  vtkRenderer *r);
54 
58  virtual void ReleaseGraphicsResources(vtkWindow *win);
59 
61 
63  vtkGetObjectMacro(PropProgram,vtkShaderProgram2);
64  void SetPropProgram(vtkShaderProgram2 *);
66 
69 
71 
72  vtkGetObjectMacro(CurrentShaderProgram2,vtkShaderProgram2);
73  //ETX
75 
77 
81  virtual void AddShaderVariable(const char *name,int numVars,int *x);
82  virtual void AddShaderVariable(const char *name,int numVars,float *x);
83  virtual void AddShaderVariable(const char *name,int numVars,double *x);
85 
86 protected:
89 
91  void LoadMultiTexturingExtensions(vtkRenderer* ren);
92 
94  virtual void ReadFrameworkMaterial();
95 
96  // Owned. Result of merging the shader program of the renderer and the
97  // PropProgram.
99 
103 
104  // Point to CachedShaderProgram2 if Shading is on and the context supports
105  // it.
107 
117 
118 
119 private:
120  vtkOpenGLProperty(const vtkOpenGLProperty&); // Not implemented.
121  void operator=(const vtkOpenGLProperty&); // Not implemented.
122 };
123 
124 #endif