VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkShaderDeviceAdapter2.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00025 #ifndef __vtkShaderDeviceAdapter2_h 00026 #define __vtkShaderDeviceAdapter2_h 00027 00028 #include "vtkObject.h" 00029 00030 class vtkShaderProgram2; 00031 00032 class VTK_RENDERING_EXPORT vtkShaderDeviceAdapter2 : public vtkObject 00033 { 00034 public: 00035 vtkTypeMacro(vtkShaderDeviceAdapter2, vtkObject); 00036 virtual void PrintSelf(ostream &os, vtkIndent indent); 00037 00039 00048 virtual void SendAttribute(const char* attrname, int components, int type, 00049 const void* attribute, 00050 unsigned long offset = 0) = 0; 00052 00053 //BTX 00055 00057 void SetShaderProgram(vtkShaderProgram2* program) 00058 { this->ShaderProgram = program; } 00059 vtkGetObjectMacro(ShaderProgram, vtkShaderProgram2) 00061 00062 // Descrition: 00063 // This method is called before rendering. This gives the shader device 00064 // adapter an opportunity to collect information, such as attribute indices 00065 // that it will need while rendering. 00066 virtual void PrepareForRender() = 0; 00067 protected: 00068 vtkShaderDeviceAdapter2(); 00069 ~vtkShaderDeviceAdapter2(); 00070 00071 vtkShaderProgram2* ShaderProgram; 00072 00073 private: 00074 vtkShaderDeviceAdapter2(const vtkShaderDeviceAdapter2&); // Not implemented 00075 void operator=(const vtkShaderDeviceAdapter2&); // Not implemented 00076 //ETX 00077 }; 00078 00079 #endif