VTK
dox/Rendering/Core/vtkShaderDeviceAdapter2.h
Go to the documentation of this file.
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 "vtkRenderingCoreModule.h" // For export macro
00029 #include "vtkObject.h"
00030 
00031 class vtkShaderProgram2;
00032 
00033 class VTKRENDERINGCORE_EXPORT vtkShaderDeviceAdapter2 : public vtkObject
00034 {
00035 public:
00036   vtkTypeMacro(vtkShaderDeviceAdapter2, vtkObject);
00037   virtual void PrintSelf(ostream &os, vtkIndent indent);
00038 
00040 
00049   virtual void SendAttribute(const char* attrname, int components, int type,
00050                              const void* attribute,
00051                              unsigned long offset = 0) = 0;
00053 
00054 //BTX
00056 
00058   void SetShaderProgram(vtkShaderProgram2* program)
00059     { this->ShaderProgram = program; }
00060   vtkGetObjectMacro(ShaderProgram, vtkShaderProgram2)
00062 
00063   // Descrition:
00064   // This method is called before rendering. This gives the shader device
00065   // adapter an opportunity to collect information, such as attribute indices
00066   // that it will need while rendering.
00067   virtual void PrepareForRender() = 0;
00068 
00069 protected:
00070   vtkShaderDeviceAdapter2();
00071   ~vtkShaderDeviceAdapter2();
00072 
00073   vtkShaderProgram2* ShaderProgram;
00074 
00075 private:
00076   vtkShaderDeviceAdapter2(const vtkShaderDeviceAdapter2&); // Not implemented
00077   void operator=(const vtkShaderDeviceAdapter2&); // Not implemented
00078 //ETX
00079 };
00080 
00081 #endif