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 
25 #include "vtkObject.h"
26 
27 class vtkShaderProgram2;
28 
30 {
31 public:
34  virtual void PrintSelf(ostream &os, vtkIndent indent);
35 
36  // Descrition:
37  // This method is called before rendering. This gives the shader device
38  // adapter an opportunity to collect information, such as attribute indices
39  // that it will need while rendering.
40  virtual void PrepareForRender();
41 
43 
54  virtual void SendAttribute(const char* attrname,
55  int components,
56  int type,
57  const void *attribute,
58  unsigned long offset=0);
60 
61 //BTX
63 
65  void SetShaderProgram(vtkShaderProgram2 *program);
66  vtkGetObjectMacro(ShaderProgram, vtkShaderProgram2);
68 
69 protected:
72 
73  int GetAttributeLocation(const char* attrName);
74 
76 
77 private:
79  // Not implemented
80  void operator=(const vtkGLSLShaderDeviceAdapter2&); // Not implemented
81 
82  class vtkInternal;
83  vtkInternal* Internal;
84 //ETX
85 };
86 
87 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:60
GLSL Program.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_RENDERING_EXPORT
adapter to pass generic vertex attributes to the rendering pipeline to be used in a vtkShaderProgram2...
static vtkObject * New()