VTK
vtkGLSLShaderDeviceAdapter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGLSLShaderDeviceAdapter.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 =========================================================================*/
25 #ifndef __vtkGLSLShaderDeviceAdapter_h
26 #define __vtkGLSLShaderDeviceAdapter_h
27 
28 #include "vtkShaderDeviceAdapter.h"
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  friend class vtkGLSLShaderProgram;
71 
72 private:
74  // Not implemented
75  void operator=(const vtkGLSLShaderDeviceAdapter&); // Not implemented
76 
77  class vtkInternal;
78  vtkInternal* Internal;
79 //ETX
80 };
81 
82 #endif