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 "vtkRenderingOpenGLModule.h" // For export macro
27 
28 class vtkShaderProgram2;
29 
32 {
33 public:
36  virtual void PrintSelf(ostream &os, vtkIndent indent);
37 
38  // Descrition:
39  // This method is called before rendering. This gives the shader device
40  // adapter an opportunity to collect information, such as attribute indices
41  // that it will need while rendering.
42  virtual void PrepareForRender();
43 
45 
56  virtual void SendAttribute(const char* attrname,
57  int components,
58  int type,
59  const void *attribute,
60  unsigned long offset=0);
62 
63 //BTX
64 protected:
67 
68  int GetAttributeLocation(const char* attrName);
69 
70 private:
72  // Not implemented
73  void operator=(const vtkGLSLShaderDeviceAdapter2&); // Not implemented
74 
75  class vtkInternal;
76  vtkInternal* Internal;
77 //ETX
78 };
79 
80 #endif
vtkGLSLShaderDeviceAdapter2::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkGLSLShaderDeviceAdapter2::PrepareForRender
virtual void PrepareForRender()
vtkShaderDeviceAdapter2
an adapter to pass generic vertex attributes to the rendering pipeline. .SECTION This class is an ada...
Definition: vtkShaderDeviceAdapter2.h:34
vtkRenderingOpenGLModule.h
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkGLSLShaderDeviceAdapter2::vtkGLSLShaderDeviceAdapter2
vtkGLSLShaderDeviceAdapter2()
vtkGLSLShaderDeviceAdapter2::GetAttributeLocation
int GetAttributeLocation(const char *attrName)
vtkShaderDeviceAdapter2.h
vtkGLSLShaderDeviceAdapter2::New
static vtkGLSLShaderDeviceAdapter2 * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGLSLShaderDeviceAdapter2::~vtkGLSLShaderDeviceAdapter2
~vtkGLSLShaderDeviceAdapter2()
vtkgl::offset
GLintptr offset
Definition: vtkgl.h:11844
vtkGLSLShaderDeviceAdapter2
adapter to pass generic vertex attributes to the rendering pipeline to be used in a vtkShaderProgram2...
Definition: vtkGLSLShaderDeviceAdapter2.h:32
vtkShaderProgram2
GLSL Program.
Definition: vtkShaderProgram2.h:68
vtkgl::components
GLenum GLenum GLuint components
Definition: vtkgl.h:16909
vtkGLSLShaderDeviceAdapter2::SendAttribute
virtual void SendAttribute(const char *attrname, int components, int type, const void *attribute, unsigned long offset=0)
vtkgl::type
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
VTKRENDERINGOPENGL_EXPORT
#define VTKRENDERINGOPENGL_EXPORT
Definition: vtkRenderingOpenGLModule.h:15