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 =========================================================================*/
23 #ifndef vtkGLSLShaderDeviceAdapter2_h
24 #define vtkGLSLShaderDeviceAdapter2_h
25 
26 #include "vtkRenderingOpenGLModule.h" // For export macro
28 
29 class vtkShaderProgram2;
30 
31 class VTKRENDERINGOPENGL_EXPORT vtkGLSLShaderDeviceAdapter2
33 {
34 public:
37  virtual void PrintSelf(ostream &os, vtkIndent indent);
38 
39  // Descrition:
40  // This method is called before rendering. This gives the shader device
41  // adapter an opportunity to collect information, such as attribute indices
42  // that it will need while rendering.
43  virtual void PrepareForRender();
44 
60  virtual void SendAttribute(const char* attrname,
61  int components,
62  int type,
63  const void *attribute,
64  unsigned long offset=0);
65 
66 protected:
69 
70  int GetAttributeLocation(const char* attrName);
71 
72 private:
73  vtkGLSLShaderDeviceAdapter2(const vtkGLSLShaderDeviceAdapter2&) VTK_DELETE_FUNCTION;
74  void operator=(const vtkGLSLShaderDeviceAdapter2&) VTK_DELETE_FUNCTION;
75 
76  class vtkInternal;
77  vtkInternal* Internal;
78 
79 };
80 
81 #endif
virtual void SendAttribute(const char *attrname, int components, int type, const void *attribute, unsigned long offset=0)=0
Sends a single attribute to the graphics card.
virtual void PrepareForRender()=0
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
GLSL Program.
a simple class to control print indentation
Definition: vtkIndent.h:39
adapter to pass generic vertex attributes to the rendering pipeline to be used in a vtkShaderProgram2...
an adapter to pass generic vertex attributes to the rendering pipeline.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...