XLE
v0.02.0
|
Container for CPUAccess::Enum. More...
Typedefs | |
typedef unsigned | BitField |
Enumerations | |
enum | Enum { Read = 1<<0, Write = 1<<1, WriteDynamic = (1<<2)|Write } |
Determines CPU access privileges More... | |
Container for CPUAccess::Enum.
Determines CPU access privileges
Determines what access (if any) the CPU will have to the buffer. This can control how the object is stored in memory in into what memory it is stored.
It is always a good idea to use as few flags as possible. Many buffers should be fine with a CPUAccess flag of "0".
Note that this flag can change how the system performs upload operations. For example, in D3D11, when the CPUAccess::WriteDynamic flag is set, UpdateSubresource() can't be used to some types of buffers. In these cases, Map() is used instead.
Try to avoid "WriteDynamic" unless the buffer will be Locked multiple times per frame. If a buffer only needs to be updated once per frame (or less), use CPUAccess::Write