Maybe the enumeration LLGL::BufferType should be replaced by LLGL::BufferFlags with additional entries to specifiy one or more purposes for binding a buffer.
This will require a lot of refactoring especially in the D3D11 backend because there are multiple sub-classes of D3D11Buffer, e.g. D3D11ConstantBuffer.
This is especially helpful with the upcoming interface for indirect draw/dispatch commands. The enum BufferType and member BufferDescriptor::type will be replaced by three new enums:
All these flags will also be available in the TextureDescriptor struct, but here the TextureType enum and type member will remain.
Because the dedicated sub-classes for vertex buffers typically have more payload than the other buffers, the new sub-class hierarchy could look like this:
Maybe the enumeration
LLGL::BufferType
should be replaced byLLGL::BufferFlags
with additional entries to specifiy one or more purposes for binding a buffer. This will require a lot of refactoring especially in the D3D11 backend because there are multiple sub-classes ofD3D11Buffer
, e.g.D3D11ConstantBuffer
.This is especially helpful with the upcoming interface for indirect draw/dispatch commands. The enum
BufferType
and memberBufferDescriptor::type
will be replaced by three new enums:All these flags will also be available in the
TextureDescriptor
struct, but here theTextureType
enum andtype
member will remain.Because the dedicated sub-classes for vertex buffers typically have more payload than the other buffers, the new sub-class hierarchy could look like this: