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
30
31class VTKRENDERINGOPENGL_EXPORT vtkGLSLShaderDeviceAdapter2
33{
34public:
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
66protected:
69
70 int GetAttributeLocation(const char* attrName);
71
72private:
74 void operator=(const vtkGLSLShaderDeviceAdapter2&) VTK_DELETE_FUNCTION;
75
76 class vtkInternal;
77 vtkInternal* Internal;
78
79};
80
81#endif
adapter to pass generic vertex attributes to the rendering pipeline to be used in a vtkShaderProgram2...
int GetAttributeLocation(const char *attrName)
static vtkGLSLShaderDeviceAdapter2 * New()
virtual void SendAttribute(const char *attrname, int components, int type, const void *attribute, unsigned long offset=0)
Sends a single attribute to the graphics card.
virtual void PrepareForRender()
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:40
an adapter to pass generic vertex attributes to the rendering pipeline.
@ type
Definition: vtkX3D.h:516
@ offset
Definition: vtkX3D.h:438