VTK  9.5.20250802
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
29
30#include <memory> // for unique_ptr
31
32VTK_ABI_NAMESPACE_BEGIN
33
34class VTKRENDERINGWEBGPU_EXPORT VTK_MARSHALAUTO vtkWebGPUShaderDatabase : public vtkObject
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
45 void AddShaderSource(const std::string& key, const std::string& source);
46
50 std::string GetShaderSource(const std::string& key) const;
51
55 void RemoveShaderSource(const std::string& key);
56
57protected:
60
61private:
63 void operator=(const vtkWebGPUShaderDatabase&) = delete;
64
65 class vtkInternals;
66 std::unique_ptr<vtkInternals> Internals;
67};
68
69VTK_ABI_NAMESPACE_END
70
71#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 *)
#define VTK_MARSHALAUTO