#include <LocalCopy.h>
Public Types | |
| enum | LockType { Read = 1, Write = 2, ReadWrite = 3 } |
Public Member Functions | |
| LocalCopy (void) | |
| ~LocalCopy (void) | |
| const unsigned char * | GetData () const |
| unsigned | GetSize () const |
| bool | IsLocked () const |
| unsigned | GetFirstDirty () const |
| unsigned | GetAfterDirty () const |
| bool | IsDirty () const |
| bool | Create (unsigned size) |
| bool | Release () |
| unsigned char * | Lock (LockType lock_type, unsigned first=0, unsigned count=0) |
| bool | Unlock () |
| bool | Update (unsigned first, unsigned count, const void *source) |
| bool | Dirty () |
| bool | Flush () |
Represents a local copy of the data of a DirectX resource (like textures, input devices, etc.).
| xl7::directx::LocalCopy::LocalCopy | ( | void | ) |
Default constructor.
| xl7::directx::LocalCopy::~LocalCopy | ( | void | ) |
Destructor.
| bool xl7::directx::LocalCopy::Create | ( | unsigned | size | ) |
Creates a new buffer with the given size (in bytes) for holding the data.
| bool xl7::directx::LocalCopy::Dirty | ( | ) |
Marks the entire buffer as dirty.
| bool xl7::directx::LocalCopy::Flush | ( | ) |
"Flushes" possible data changes by unmarking dirty regions of the buffer.
| unsigned xl7::directx::LocalCopy::GetAfterDirty | ( | ) | const [inline] |
Returns the index of the first byte after the dirty region that has not been overwritten during the last write lock or update action.
| const unsigned char* xl7::directx::LocalCopy::GetData | ( | ) | const [inline] |
Returns the buffer holding the local copy data (for reading only).
| unsigned xl7::directx::LocalCopy::GetFirstDirty | ( | ) | const [inline] |
Returns the index of the first byte that has been overwritten during the last write lock or update action.
| unsigned xl7::directx::LocalCopy::GetSize | ( | ) | const [inline] |
Returns the size (in bytes) of the data buffer.
| bool xl7::directx::LocalCopy::IsDirty | ( | ) | const [inline] |
Returns true, if the data buffer or a part of it is dirty.
| bool xl7::directx::LocalCopy::IsLocked | ( | ) | const [inline] |
Returns the flag specifying whether this local copy is currently locked.
| unsigned char * xl7::directx::LocalCopy::Lock | ( | LockType | lock_type, | |
| unsigned | first = 0, |
|||
| unsigned | count = 0 | |||
| ) |
Locks the data buffer for reading and/or writing. If count is set to 0, first is ignored and the entire buffer will be locked.
| bool xl7::directx::LocalCopy::Release | ( | ) |
Releases the internal data buffer.
| bool xl7::directx::LocalCopy::Unlock | ( | ) |
Unlocks the data buffer.
| bool xl7::directx::LocalCopy::Update | ( | unsigned | first, | |
| unsigned | count, | |||
| const void * | source | |||
| ) |
Updates some bytes of the data buffer by overwriting them with the contents of the given source buffer. if count is set to 0, first is ignored and the contents of the entire buffer will be overwritten.
1.7.1