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=========================================================================*/
26#ifndef vtkShaderDeviceAdapter2_h
27#define vtkShaderDeviceAdapter2_h
28
29#include "vtkRenderingCoreModule.h" // For export macro
30#include "vtkObject.h"
31
33
34class VTKRENDERINGCORE_EXPORT vtkShaderDeviceAdapter2 : public vtkObject
35{
36public:
38 virtual void PrintSelf(ostream &os, vtkIndent indent);
39
53 virtual void SendAttribute(const char* attrname, int components, int type,
54 const void* attribute,
55 unsigned long offset = 0) = 0;
56
62 { this->ShaderProgram = program; }
63 vtkGetObjectMacro(ShaderProgram, vtkShaderProgram2)
64
65 // Descrition:
66 // This method is called before rendering. This gives the shader device
67 // adapter an opportunity to collect information, such as attribute indices
68 // that it will need while rendering.
69 virtual void PrepareForRender() = 0;
70
71protected:
74
76
77private:
78 vtkShaderDeviceAdapter2(const vtkShaderDeviceAdapter2&) VTK_DELETE_FUNCTION;
79 void operator=(const vtkShaderDeviceAdapter2&) VTK_DELETE_FUNCTION;
80
81};
82
83#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
an adapter to pass generic vertex attributes to the rendering pipeline.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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.
void SetShaderProgram(vtkShaderProgram2 *program)
Set the shader program which is being updated by this device adapter.
@ ShaderProgram
Definition: vtkX3D.h:202
@ type
Definition: vtkX3D.h:516
@ offset
Definition: vtkX3D.h:438