5#include "../Base/BuffersCommon.h"
6#include "../VertexFormat.h"
8#include "../Base/ResourceMap.h"
25 delete reinterpret_cast<BufferTag*
>(vertexBufferHandle.
handle);
33 delete reinterpret_cast<BufferTag*
>(indexBufferHandle.
handle);
40 return BufferHandle(
reinterpret_cast<int64_t
>(
new BufferTag()));
44 delete reinterpret_cast<BufferTag*
>(bufferHandle.
handle);
48 return reinterpret_cast<void*
>(bufferHandle.
handle);
virtual VertexBufferHandle loadVertexBuffer(const void *, const size_t, const VertexFormat &) override
Loads a new vertex buffer and populates it with the given data.
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 void * getNativeHandle(BufferHandle bufferHandle) override
Get the device-specific handle (D3D buffer pointer, OpenGL buffer ID etc) associated with the given b...
virtual void releaseInputLayout(InputLayoutHandle inputLayoutHandle) override
Releases the input layout with the given inputLayoutHandle.
virtual void retrieveSubBuffer(void *, BufferHandle, const size_t, const size_t) override
Retrieves the contents of a buffer.
virtual void releaseResources() override
Releases all allocated buffer resources.
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 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 releaseBuffer(BufferHandle bufferHandle) override
Releases the buffer with the given bufferHandle.
virtual void releaseIndexBuffer(IndexBufferHandle indexBufferHandle) override
Releases the index buffer with the given handle.
Contains all Cogs related functionality.
handle_type handle
Internal resource handle.