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