LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::MiscFlags Struct Reference

Miscellaneous resource flags. More...

#include <ResourceFlags.h>

Public Types

enum  {
  DynamicUsage = (1 << 0) , FixedSamples = (1 << 1) , GenerateMips = (1 << 2) , NoInitialData = (1 << 3) ,
  Append = (1 << 4) , Counter = (1 << 5)
}

Detailed Description

Miscellaneous resource flags.

See also
BufferDescriptor::miscFlags
TextureDescriptor::miscFlags

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DynamicUsage 

Hint to the renderer that the resource will be frequently updated from the CPU.

Remarks
This is useful for a constant buffer for instance, that is updated by the host program every frame.
See also
RenderSystem::WriteBuffer
RenderSystem::WriteTexture
Todo
Restriction required to support deferred context in D3D11. This must no longer be just a "hint", it must be a strictly defined attribute for a buffer.
FixedSamples 

Multi-sampled Texture resource has fixed sample locations.

Remarks
This can only be used with multi-sampled Texture resources (i.e. TextureType::Texture2DMS, TextureType::Texture2DMSArray).
GenerateMips 

Generates MIP-maps at texture creation time with the initial image data (if specified).

Remarks
To generate MIP-maps, the texture must be created with the binding flags BindFlags::Sampled and BindFlags::ColorAttachment, which is the default.
This can be used to generate all MIP-maps when a new texture is created without explicitly encoding the CommandBuffer::GenerateMips function. The number of MIP-maps being generated depends on the mipLevels attribute in TextureDescriptor.
See also
TextureDescriptor::mipLevels
CommandBuffer::GenerateMips
NoInitialData 

Specifies to ignore resource data initialization.

Remarks
If this is specified, a texture or buffer resource will stay uninitialized during creation and the content is undefined.
Append 

Enables a storage buffer to be used for AppendStructuredBuffer and ConsumeStructuredBuffer in HLSL only.

Remarks
This can only be used with buffers that also have the binding flag BindFlags::Storage and a stride greater than zero.
This cannot be used together with the MiscFlags::Counter bit.
Note
Only supported with: Direct3D 11, Direct3D 12.
See also
BufferDescriptor::stride
ResourceViewDescriptor::initialCount
https://docs.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_buffer_uav_flag
Counter 

Enables the hidden counter in a storage buffer to be used for RWStructuredBuffer in HLSL only.

Remarks
This can only be used with buffers that also have the binding flag BindFlags::Storage and a stride greater than zero.
This cannot be used together with the MiscFlags::Append bit.
Note
Only supported with Direct3D 11, Direct3D 12.
See also
BufferDescriptor::stride
ResourceViewDescriptor::initialCount
https://docs.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_buffer_uav_flag

The documentation for this struct was generated from the following file: