3#include "CommonWebGPU.h"
5#include "../IRenderTargets.h"
6#include "../Base/ResourceMap.h"
9 class GraphicsDeviceWebGPU;
12 WGPUTextureView view[8] = {};
14 WGPUTextureFormat format[8] = { WGPUTextureFormat_Undefined };
21 size_t hash(
size_t base)
28 WGPUTextureView view = {};
31 WGPUTextureFormat format = WGPUTextureFormat_Undefined;
33 size_t hash(
size_t base)
virtual void releaseRenderTarget(RenderTargetHandle handle) override
Release the render target with the given renderTargetHandle.
virtual void releaseResources() override
Release all allocated render target resources.
virtual DepthStencilHandle createDepthStencilTarget(const RenderTargetHandle handle) override
Creates a depth/stencil target to back the render target with the given handle.
virtual void releaseDepthStencilState(DepthStencilStateHandle depthStencilStateHandle) override
Release the depth stencil state with the given handle.
virtual DepthStencilStateHandle loadDepthStencilState(const DepthStencilState &depthStencilState) override
Load a depth stencil state object.
virtual BlendStateHandle loadBlendState(const BlendState &blendState) override
Load a blend state object.
virtual void releaseRasterizerState(RasterizerStateHandle rasterizerStateHandle) override
Release the rasterizer state with the given handle.
virtual RasterizerStateHandle loadRasterizerState(const RasterizerState &rasterizerState) override
Load a rasterizer state object.
virtual void releaseBlendState(BlendStateHandle blendStateHandle) override
Release the blend state with the given handle.
virtual BlendStateHandle loadBlendState(const BlendState &color, const BlendState &alpha) override
Load a blend state object with separate blending for alpha channel.
virtual void releaseDepthStencilTarget(DepthStencilHandle handle) override
Release the depth target with the given depthStencilHandle.
virtual void annotate(RenderTargetHandle, const StringView &) override
Associate a name with an object for use in graphics debugging.
virtual void annotate(DepthStencilHandle, const StringView &) override
Associate a name with an object for use in graphics debugging.
virtual RenderTargetHandle createRenderTarget(const RenderTargetViewDescription *renderTargetViews, const size_t numViews) override
Create a render target using the given view descriptions.
Provides a weakly referenced view over the contents of a string.
Contains all Cogs related functionality.
constexpr size_t hash() noexcept
Simple getter function that returns the initial value for fnv1a hashing.
Encapsulates blend state for the graphics pipeline in a state object.
Encapsulates state for depth buffer usage and stencil buffer usage in a state object.
Describes a single depth stencil view and which resources to use from the underlying texture.
handle_type handle
Internal resource handle.
Provides render target management functionality.
Encapsulates state for primitive rasterization in a state object.
Describes a single render target view and which resources to use from the underlying texture.