VTK  9.4.20241222
vtkWebGPUShaderDatabase.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
22#ifndef vtkWebGPUShaderDatabase_h
23#define vtkWebGPUShaderDatabase_h
24
25#include "vtkObject.h"
26
27#include "vtkRenderingWebGPUModule.h" // for export macro
28
29#include <memory> // for unique_ptr
30
31VTK_ABI_NAMESPACE_BEGIN
32
33class VTKRENDERINGWEBGPU_EXPORT vtkWebGPUShaderDatabase : public vtkObject
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
44 void AddShaderSource(const std::string& key, const std::string& source);
45
49 std::string GetShaderSource(const std::string& key) const;
50
54 void RemoveShaderSource(const std::string& key);
55
56protected:
59
60private:
62 void operator=(const vtkWebGPUShaderDatabase&) = delete;
63
64 class vtkInternals;
65 std::unique_ptr<vtkInternals> Internals;
66};
67
68VTK_ABI_NAMESPACE_END
69
70#endif
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
Class to add and retrieve source code for shader files for a specified key.
static vtkWebGPUShaderDatabase * New()
std::string GetShaderSource(const std::string &key) const
Retrieve the shader source code for the given key.
void RemoveShaderSource(const std::string &key)
Remove the shader source code for the given key.
~vtkWebGPUShaderDatabase() override
void AddShaderSource(const std::string &key, const std::string &source)
Add shader source code into the database.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)