35#ifndef vtkWebGPURenderPipelineCache_h
36#define vtkWebGPURenderPipelineCache_h
40#include "vtkRenderingWebGPUModule.h"
44VTK_ABI_NAMESPACE_BEGIN
74 std::string
GetPipelineKey(wgpu::RenderPipelineDescriptor* descriptor,
const char* shaderSource);
83 const char* vertexShaderSource,
const char* fragmentShaderSource);
105 const char* fragmentShaderSource);
115 std::string&
source,
const std::string& search,
const std::string& replace,
bool all);
132 std::unique_ptr<vtkInternals> Internals;
a simple class to control print indentation
abstract base class for most VTK objects
Class to create and retrieve render pipelines based on a given key.
static bool Substitute(std::string &source, const std::string &search, const std::string &replace, bool all)
Substitute all occurrences of search with replace in source.
static vtkWebGPURenderPipelineCache * New()
void DestroyRenderPipeline(const std::string &key)
Destroy the render pipeline associated with the given hash.
void ReleaseGraphicsResources(vtkWindow *window)
Reset the pipeline cache.
std::string GetPipelineKey(wgpu::RenderPipelineDescriptor *descriptor, const char *vertexShaderSource, const char *fragmentShaderSource)
Get a unique hash for the given combination of render pipeline descriptor and shader source.
~vtkWebGPURenderPipelineCache() override
void CreateRenderPipeline(wgpu::RenderPipelineDescriptor *descriptor, vtkWebGPURenderWindow *wgpuRenderWindow, const char *shaderSource)
Create a render pipeline for the given combination of render pipeline descriptor and shader source.
wgpu::RenderPipeline GetRenderPipeline(const std::string &key)
Get a render pipeline associated with the given hash.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::string GetPipelineKey(wgpu::RenderPipelineDescriptor *descriptor, const char *shaderSource)
Get a unique hash for the given combination of render pipeline descriptor and shader source.
vtkWebGPURenderPipelineCache()
void CreateRenderPipeline(wgpu::RenderPipelineDescriptor *descriptor, vtkWebGPURenderWindow *wgpuRenderWindow, const char *vertexShaderSource, const char *fragmentShaderSource)
Create a render pipeline for the given combination of render pipeline descriptor and shader source.
window superclass for vtkRenderWindow
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)