3#include "CommonWebGPU.h"
7#include "../Base/BuffersCommon.h"
8#include "../VertexFormat.h"
10#include "../Base/ResourceMap.h"
13 class GraphicsDeviceWebGPU;
24 uint32_t alias_idx = 0;
25 std::vector<WGPUBuffer> alias;
33 std::vector<WGPUVertexAttribute> vertex_attributes;
34 std::vector<WGPUVertexBufferLayout> vertex_buffer_layout;
40 void resetInstances();
virtual IndexBufferHandle loadIndexBuffer(const void *, const size_t, const size_t) override
Loads a new index buffer and populates it with the given indexData.
virtual VertexBufferHandle loadVertexBuffer(const void *, const size_t, const VertexFormat &vertexFormat) override
Loads a new vertex buffer and populates it with the given data.
virtual void releaseVertexBuffer(VertexBufferHandle vertexBufferHandle) override
Release the vertex buffer with the given handle.
virtual InputLayoutHandle loadInputLayout(const VertexFormatHandle *vertexFormats, const size_t count, EffectHandle effectHandle) override
Loads a new input layout to map vertex flow between vertex buffers with the given vertexFormats to ef...
virtual void retrieveSubBuffer(void *, BufferHandle, const size_t, const size_t) override
Retrieves the contents of a buffer.
virtual BufferHandle loadBuffer(const void *, const size_t, Usage::EUsage, uint32_t, uint32_t, uint32_t=0) override
Loads a new buffer using the given data to populate the buffer.
virtual void * getNativeHandle(BufferHandle bufferHandle) override
Get the device-specific handle (D3D buffer pointer, OpenGL buffer ID etc) associated with the given b...
virtual void releaseBuffer(BufferHandle bufferHandle) override
Releases the buffer with the given bufferHandle.
virtual void releaseInputLayout(InputLayoutHandle inputLayoutHandle) override
Releases the input layout with the given inputLayoutHandle.
virtual void releaseResources() override
Releases all allocated buffer resources.
virtual void releaseIndexBuffer(IndexBufferHandle indexBufferHandle) override
Releases the index buffer with the given handle.
Contains all Cogs related functionality.