VTK
vtkShaderDeviceAdapter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkShaderDeviceAdapter.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 =========================================================================*/
30 #ifndef __vtkShaderDeviceAdapter_h
31 #define __vtkShaderDeviceAdapter_h
32 
33 #include "vtkObject.h"
34 
35 class vtkShaderProgram;
36 
38 {
39 public:
41  virtual void PrintSelf(ostream &os, vtkIndent indent);
42 
44 
53  virtual void SendAttribute(const char* attrname,
54  int components, int type,
55  const void* attribute, unsigned long offset=0)=0;
57 
59 
62  { this->ShaderProgram = pgm; }
63  vtkGetObjectMacro(ShaderProgram, vtkShaderProgram);
65 
66  // Descrition:
67  // This method is called before rendering. This gives the shader device
68  // adapter an opportunity to collect information, such as attribute indices
69  // that it will need while rendering.
70  virtual void PrepareForRender()=0;
71 protected:
74 
76 
77 private:
78  vtkShaderDeviceAdapter(const vtkShaderDeviceAdapter&); // Not implemented
79  void operator=(const vtkShaderDeviceAdapter&); // Not implemented
80 };
81 
82 #endif