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; }
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:
72 
74 
75 private:
76  vtkShaderDeviceAdapter2(const vtkShaderDeviceAdapter2&); // Not implemented
77  void operator=(const vtkShaderDeviceAdapter2&); // Not implemented
78 //ETX
79 };
80 
81 #endif
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkShaderDeviceAdapter2::SetShaderProgram
void SetShaderProgram(vtkShaderProgram2 *program)
Definition: vtkShaderDeviceAdapter2.h:58
vtkShaderDeviceAdapter2
an adapter to pass generic vertex attributes to the rendering pipeline. .SECTION This class is an ada...
Definition: vtkShaderDeviceAdapter2.h:34
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkgl::program
GLuint program
Definition: vtkgl.h:13011
vtkShaderDeviceAdapter2::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkShaderDeviceAdapter2::SendAttribute
virtual void SendAttribute(const char *attrname, int components, int type, const void *attribute, unsigned long offset=0)=0
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkRenderingCoreModule.h
vtkgl::offset
GLintptr offset
Definition: vtkgl.h:11844
vtkObject.h
vtkShaderProgram2
GLSL Program.
Definition: vtkShaderProgram2.h:68
VTKRENDERINGCORE_EXPORT
#define VTKRENDERINGCORE_EXPORT
Definition: vtkRenderingCoreModule.h:15
vtkgl::components
GLenum GLenum GLuint components
Definition: vtkgl.h:16909
vtkgl::type
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
vtkX3D::ShaderProgram
@ ShaderProgram
Definition: vtkX3D.h:202