VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkCgShaderDeviceAdapter.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 __vtkCgShaderDeviceAdapter_h 00026 #define __vtkCgShaderDeviceAdapter_h 00027 00028 #include "vtkShaderDeviceAdapter.h" 00029 00030 class VTK_RENDERING_EXPORT vtkCgShaderDeviceAdapter : public vtkShaderDeviceAdapter 00031 { 00032 public: 00033 static vtkCgShaderDeviceAdapter* New(); 00034 vtkTypeMacro(vtkCgShaderDeviceAdapter, vtkShaderDeviceAdapter); 00035 void PrintSelf(ostream& os, vtkIndent indent); 00036 00037 // Descrition: 00038 // This method is called before rendering. This gives the shader device 00039 // adapter an opportunity to collect information, such as attribute indices 00040 // that it will need while rendering. 00041 virtual void PrepareForRender(); 00042 00044 00053 virtual void SendAttribute(const char* attrname, 00054 int components, int type, 00055 const void* attribute, unsigned long offset=0); 00057 00058 //BTX 00059 void SendAttributeInternal(const char* attrname, int components, const double*); 00060 void SendAttributeInternal(const char* attrname, int components, const float*); 00061 protected: 00062 vtkCgShaderDeviceAdapter(); 00063 ~vtkCgShaderDeviceAdapter(); 00064 00065 private: 00066 vtkCgShaderDeviceAdapter(const vtkCgShaderDeviceAdapter&); // Not implemented. 00067 void operator=(const vtkCgShaderDeviceAdapter&); // Not implemented. 00068 00069 class vtkInternal; 00070 vtkInternal* Internal; 00071 //ETX 00072 }; 00073 00074 #endif 00075 00076