• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Rendering/vtkGLSLShaderDeviceAdapter2.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGLSLShaderDeviceAdapter2.h,v $
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 "vtkObject.h"
00026 
00027 class vtkShaderProgram2;
00028 
00029 class VTK_RENDERING_EXPORT vtkGLSLShaderDeviceAdapter2 :  public vtkObject
00030 {
00031 public:
00032   vtkTypeRevisionMacro(vtkGLSLShaderDeviceAdapter2, vtkObject);
00033   static vtkGLSLShaderDeviceAdapter2 *New();
00034   virtual void PrintSelf(ostream &os, vtkIndent indent);
00035 
00036   // Descrition:
00037   // This method is called before rendering. This gives the shader device
00038   // adapter an opportunity to collect information, such as attribute indices
00039   // that it will need while rendering.
00040   virtual void PrepareForRender();
00041 
00043 
00054   virtual void SendAttribute(const char* attrname,
00055                              int components,
00056                              int type,
00057                              const void *attribute,
00058                              unsigned long offset=0);
00060    
00061 //BTX  
00063 
00065   void SetShaderProgram(vtkShaderProgram2 *program);
00066   vtkGetObjectMacro(ShaderProgram, vtkShaderProgram2);
00068   
00069 protected:
00070   vtkGLSLShaderDeviceAdapter2();
00071   ~vtkGLSLShaderDeviceAdapter2();
00072 
00073   int GetAttributeLocation(const char* attrName);
00074 
00075   vtkShaderProgram2 *ShaderProgram;
00076   
00077 private:
00078   vtkGLSLShaderDeviceAdapter2(const vtkGLSLShaderDeviceAdapter2&);
00079   // Not implemented
00080   void operator=(const vtkGLSLShaderDeviceAdapter2&); // Not implemented
00081 
00082   class vtkInternal;
00083   vtkInternal* Internal;
00084 //ETX
00085 };
00086 
00087 #endif

Generated by  doxygen 1.7.1