VTK
vtkShaderCodeLibrary.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkShaderCodeLibrary.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef __vtkShaderCodeLibrary_h
25 #define __vtkShaderCodeLibrary_h
26 
27 #include "vtkIOGeometryModule.h" // For export macro
28 #include "vtkObject.h"
29 
30 class VTKIOGEOMETRY_EXPORT vtkShaderCodeLibrary : public vtkObject
31 {
32 public:
33  static vtkShaderCodeLibrary* New();
35  void PrintSelf(ostream& os, vtkIndent indent);
36 
41  static char* GetShaderCode(const char* name);
42 
46  static const char** GetListOfShaderCodeNames();
47 
49 
51  static void RegisterShaderCode(const char* name, const char* code);
52 //BTX
53 protected:
57 
58 private:
59  vtkShaderCodeLibrary(const vtkShaderCodeLibrary&); // Not implemented.
60  void operator=(const vtkShaderCodeLibrary&); // Not implemented.
61 
62  // vtkInternalCleanup is used to destroy Internal ptr when the application
63  // exits.
64  class vtkInternalCleanup
65  {
66  public:
67  vtkInternalCleanup() {};
68  ~vtkInternalCleanup();
69  };
70 
71  friend class vtkInternalCleanup;
72  static vtkInternalCleanup Cleanup;
73 
74  // vtkInternal is used to maintain user registered shader codes.
75  class vtkInternal;
76  static vtkInternal* Internal;
77 //ETX
78 };
79 
80 
81 
82 #endif
83