VTK
vtkGLSLShaderDeviceAdapter2.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGLSLShaderDeviceAdapter2.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 __vtkGLSLShaderDeviceAdapter2_h
23 #define __vtkGLSLShaderDeviceAdapter2_h
24 
26 
27 class vtkShaderProgram2;
28 
31 {
32 public:
35  virtual void PrintSelf(ostream &os, vtkIndent indent);
36 
37  // Descrition:
38  // This method is called before rendering. This gives the shader device
39  // adapter an opportunity to collect information, such as attribute indices
40  // that it will need while rendering.
41  virtual void PrepareForRender();
42 
44 
55  virtual void SendAttribute(const char* attrname,
56  int components,
57  int type,
58  const void *attribute,
59  unsigned long offset=0);
61 
62 //BTX
64 
66  void SetShaderProgram(vtkShaderProgram2 *program);
67  vtkGetObjectMacro(ShaderProgram, vtkShaderProgram2);
69 
70 protected:
73 
74  int GetAttributeLocation(const char* attrName);
75 
77 
78 private:
80  // Not implemented
81  void operator=(const vtkGLSLShaderDeviceAdapter2&); // Not implemented
82 
83  class vtkInternal;
84  vtkInternal* Internal;
85 //ETX
86 };
87 
88 #endif