3#include "CommonWebGPU.h"
5#include "../Base/TexturesCommon.h"
6#include "../Base/ResourceMap.h"
12 WGPUTextureFormat view_format;
13 WGPUTextureViewDimension view_dimension;
14 WGPUTextureView texture_view;
21 WGPUTextureView texture_view;
29 using TexturesCommon::loadTexture;
50 return reinterpret_cast<void*
>(textures[handle].texture);
Provides a weakly referenced view over the contents of a string.
virtual void generateMipmaps(TextureHandle handle) override
Use the graphics device to generate mipmaps for the texture with the given texture handle.
virtual void releaseTexture(TextureHandle textureHandle) override
Release the texture with the given textureHandle.
virtual void releaseSamplerState(SamplerStateHandle handle) override
Release the sampler state with the given handle.
virtual SamplerStateHandle loadSamplerState(const SamplerState &state) override
Load a sampler state object.
virtual void annotate(TextureHandle handle, const StringView &name) override
Associate a name with an object for use in graphics debugging.
virtual TextureHandle loadTexture(const TextureDescription &desc, const TextureData *data) override
Load a texture from the given description.
virtual void releaseTextureView(const TextureViewHandle &handle) override
Release the given texture view.
virtual TextureViewHandle createTextureView(TextureViewDescription &view) override
Create a texture view used to bind a limited view of the texture data to the rendering pipeline.
virtual void releaseResources() override
Release all allocated texture resources.
virtual void * getNativeHandle(TextureHandle handle) override
Get the device-specific handle (D3D texture pointer, OpenGL texture ID etc) associated with the given...
Contains all Cogs related functionality.
Encapsulates state for texture sampling in a state object.
Describes how to fetch data from a texture in shaders.