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; }
#define COGS_RENDERING_ENABLE_ENUM_FLAGS(EnumType)
Definition: Flags.h:8
Access mode to buffers after creation.
Definition: Flags.h:41
EAccessMode
Access mode enumeration.
Definition: Flags.h:44
@ Read
The buffer can be mapped and read from by the CPU after creation.
Definition: Flags.h:48
@ Write
The buffer can be mapped and written to by the CPU after creation.
Definition: Flags.h:50
@ None
The buffer can not be either read from or written to by the CPU after creation.
Definition: Flags.h:46
@ ReadWrite
Definition: Flags.h:53
Bind flags describe how a resource can be used by the graphics pipeline.
Definition: Flags.h:61
EBindFlags
Bind flags enumeration.
Definition: Flags.h:64
@ ConstantBuffer
The buffer can be bound as input to effects as a constant buffer.
Definition: Flags.h:72
@ StructuredBufferWithCounter
The buffer can be bound as a structured buffer and read or written from shaders, with an additional a...
Definition: Flags.h:82
@ StreamOutBuffer
The buffer can be bound as stream output to receive transform feedback results.
Definition: Flags.h:74
@ VertexBuffer
The buffer can be bound as input to the vertex shader stage as a vertex buffer.
Definition: Flags.h:68
@ RawBuffer
The buffer can be bound as a byte address buffer and read or written from shaders.
Definition: Flags.h:78
@ IndexBuffer
The buffer can be bound as input to the vertex shader stage as an index buffer.
Definition: Flags.h:70
@ None
The buffer will not be bound to the graphics pipeline. Suitable for staging resources.
Definition: Flags.h:66
@ ShaderResource
The buffer can be bound as a shader resource and read from shaders.
Definition: Flags.h:76
@ StructuredBuffer
The buffer can be bound as a structured buffer and read or written from shaders.
Definition: Flags.h:80
Mapping modes for resources managed by the graphics system.
Definition: Flags.h:90
EMapMode
Mapping mode enumeration.
Definition: Flags.h:93
@ WriteDiscard
Write access. When unmapping the graphics system will discard the old contents of the resource.
Definition: Flags.h:103
@ ReadWrite
Read and write access.
Definition: Flags.h:101
@ Write
Definition: Flags.h:99
@ Read
Definition: Flags.h:96
Texture flags describing valid usage for a texture object.
Definition: Flags.h:111
ETextureFlags
Texture flags enumeration.
Definition: Flags.h:114
@ DepthBuffer
The texture can be used as a depth target and have depth buffer values written into.
Definition: Flags.h:122
@ NoDelete
The ownership of the underlying texture resource is outside of cogs and cogs will not delete it.
Definition: Flags.h:136
@ UsageWriteStaging
Definition: Flags.h:134
@ RenderTarget
The texture can be used as a render target and drawn into.
Definition: Flags.h:120
@ ExternalTexture
Definition: Flags.h:131
@ GenerateMipMaps
The texture supports automatic mipmap generation performed by the graphics device.
Definition: Flags.h:124
@ Texture
Texture usage, see Default.
Definition: Flags.h:118
@ ReadWriteTexture
The texture can be used as a read/write texture. Can be used to output data from compute shaders.
Definition: Flags.h:128
@ UsageReadStaging
The texture is intended to be used as a staging texture.
Definition: Flags.h:133
@ CubeMap
The texture can be used as a cube map.
Definition: Flags.h:126
@ Default
Default usage, the texture can be loaded once and bound and sampled in shaders.
Definition: Flags.h:116
Usage flags for buffers.
Definition: Flags.h:21
EUsage
Usage enumeration.
Definition: Flags.h:24
@ Static
Buffer will be loaded once and used to render many subsequent frames without any updates.
Definition: Flags.h:28
@ Default
Default usage.
Definition: Flags.h:26
@ Dynamic
Buffer will be loaded and modified with some frequency.
Definition: Flags.h:30
@ Staging
Definition: Flags.h:33