VTK
vtkShaderDeviceAdapter2.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkShaderDeviceAdapter2.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 =========================================================================*/
25 #ifndef vtkShaderDeviceAdapter2_h
26 #define vtkShaderDeviceAdapter2_h
27 
28 #include "vtkRenderingCoreModule.h" // For export macro
29 #include "vtkObject.h"
30 
31 class vtkShaderProgram2;
32 
34 {
35 public:
37  virtual void PrintSelf(ostream &os, vtkIndent indent);
38 
40 
49  virtual void SendAttribute(const char* attrname, int components, int type,
50  const void* attribute,
51  unsigned long offset = 0) = 0;
53 
54 //BTX
56 
59  { this->ShaderProgram = program; }
60  vtkGetObjectMacro(ShaderProgram, vtkShaderProgram2)
62 
63  // Descrition:
64  // This method is called before rendering. This gives the shader device
65  // adapter an opportunity to collect information, such as attribute indices
66  // that it will need while rendering.
67  virtual void PrepareForRender() = 0;
68 
69 protected:
71  ~vtkShaderDeviceAdapter2();
72 
74 
75 private:
76  vtkShaderDeviceAdapter2(const vtkShaderDeviceAdapter2&); // Not implemented
77  void operator=(const vtkShaderDeviceAdapter2&); // Not implemented
78 //ETX
79 };
80 
81 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
void SetShaderProgram(vtkShaderProgram2 *program)
GLSL Program.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKRENDERINGCORE_EXPORT
an adapter to pass generic vertex attributes to the rendering pipeline. .SECTION This class is an ada...