8#define COGS_RENDERING_ENABLE_ENUM_FLAGS(EnumType) \
9 static_assert(sizeof(EnumType) <= sizeof(uint32_t)); \
10 constexpr EnumType operator|(EnumType lhs, EnumType rhs) { return static_cast<EnumType>(static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs)); } \
11 constexpr EnumType operator&(EnumType lhs, EnumType rhs) { return static_cast<EnumType>(static_cast<uint32_t>(lhs) & static_cast<uint32_t>(rhs)); } \
12 constexpr EnumType & operator|=(EnumType & lhs, EnumType rhs) { lhs = static_cast<EnumType>(static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs)); return lhs; }
134 UsageWriteStaging = 0x0100,
Contains all Cogs related functionality.
Access mode to buffers after creation.
EAccessMode
Access mode enumeration.
@ Read
The buffer can be mapped and read from by the CPU after creation.
@ Write
The buffer can be mapped and written to by the CPU after creation.
@ None
The buffer can not be either read from or written to by the CPU after creation.
Bind flags describe how a resource can be used by the graphics pipeline.
EBindFlags
Bind flags enumeration.
@ ConstantBuffer
The buffer can be bound as input to effects as a constant buffer.
@ StructuredBufferWithCounter
The buffer can be bound as a structured buffer and read or written from shaders, with an additional a...
@ StreamOutBuffer
The buffer can be bound as stream output to receive transform feedback results.
@ VertexBuffer
The buffer can be bound as input to the vertex shader stage as a vertex buffer.
@ RawBuffer
The buffer can be bound as a byte address buffer and read or written from shaders.
@ IndexBuffer
The buffer can be bound as input to the vertex shader stage as an index buffer.
@ None
The buffer will not be bound to the graphics pipeline. Suitable for staging resources.
@ ShaderResource
The buffer can be bound as a shader resource and read from shaders.
@ StructuredBuffer
The buffer can be bound as a structured buffer and read or written from shaders.
Mapping modes for resources managed by the graphics system.
EMapMode
Mapping mode enumeration.
@ WriteDiscard
Write access. When unmapping the graphics system will discard the old contents of the resource.
@ ReadWrite
Read and write access.
Texture flags describing valid usage for a texture object.
ETextureFlags
Texture flags enumeration.
@ DepthBuffer
The texture can be used as a depth target and have depth buffer values written into.
@ NoDelete
The ownership of the underlying texture resource is outside of cogs and cogs will not delete it.
@ RenderTarget
The texture can be used as a render target and drawn into.
@ GenerateMipMaps
The texture supports automatic mipmap generation performed by the graphics device.
@ Texture
Texture usage, see Default.
@ ReadWriteTexture
The texture can be used as a read/write texture. Can be used to output data from compute shaders.
@ UsageReadStaging
The texture is intended to be used as a staging texture.
@ CubeMap
The texture can be used as a cube map.
@ Default
Default usage, the texture can be loaded once and bound and sampled in shaders.
@ Static
Buffer will be loaded once and used to render many subsequent frames without any updates.
@ Dynamic
Buffer will be loaded and modified with some frequency.