VTK
dox/IO/vtkShaderCodeLibrary.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkShaderCodeLibrary.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 =========================================================================*/
00024 #ifndef __vtkShaderCodeLibrary_h
00025 #define __vtkShaderCodeLibrary_h
00026 
00027 #include "vtkObject.h"
00028 
00029 class VTK_IO_EXPORT vtkShaderCodeLibrary : public vtkObject
00030 {
00031 public:
00032   static vtkShaderCodeLibrary* New();
00033   vtkTypeMacro(vtkShaderCodeLibrary, vtkObject);
00034   void PrintSelf(ostream& os, vtkIndent indent);
00035 
00040   static char* GetShaderCode(const char* name);
00041 
00045   static const char** GetListOfShaderCodeNames();
00046 
00048 
00050   static void RegisterShaderCode(const char* name, const char* code);
00051 //BTX
00052 protected:
00053   vtkShaderCodeLibrary();
00054   ~vtkShaderCodeLibrary();
00056 
00057 private:
00058   vtkShaderCodeLibrary(const vtkShaderCodeLibrary&); // Not implemented.
00059   void operator=(const vtkShaderCodeLibrary&); // Not implemented.
00060 
00061   // vtkInternalCleanup is used to destroy Internal ptr when the application
00062   // exits.
00063   class vtkInternalCleanup
00064     {
00065   public:
00066     vtkInternalCleanup() {};
00067     ~vtkInternalCleanup();
00068     };
00069 
00070   friend class vtkInternalCleanup;
00071   static vtkInternalCleanup Cleanup;
00072 
00073   // vtkInternal is used to maintain user registered shader codes.
00074   class vtkInternal;
00075   static vtkInternal* Internal;
00076 //ETX
00077 };
00078 
00079 
00080 
00081 #endif
00082