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 "vtkObject.h"
28 
30 {
31 public:
32  static vtkShaderCodeLibrary* New();
34  void PrintSelf(ostream& os, vtkIndent indent);
35 
40  static char* GetShaderCode(const char* name);
41 
45  static const char** GetListOfShaderCodeNames();
46 
48 
50  static void RegisterShaderCode(const char* name, const char* code);
51 //BTX
52 protected:
56 
57 private:
58  vtkShaderCodeLibrary(const vtkShaderCodeLibrary&); // Not implemented.
59  void operator=(const vtkShaderCodeLibrary&); // Not implemented.
60 
61  // vtkInternalCleanup is used to destroy Internal ptr when the application
62  // exits.
63  class vtkInternalCleanup
64  {
65  public:
66  vtkInternalCleanup() {};
67  ~vtkInternalCleanup();
68  };
69 
70  friend class vtkInternalCleanup;
71  static vtkInternalCleanup Cleanup;
72 
73  // vtkInternal is used to maintain user registered shader codes.
74  class vtkInternal;
75  static vtkInternal* Internal;
76 //ETX
77 };
78 
79 
80 
81 #endif
82 
abstract base class for most VTK objects
Definition: vtkObject.h:60
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
Library for Hardware Shaders.
#define VTK_IO_EXPORT
static vtkObject * New()