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