libSDL2pp
C++ bindings/wrapper for SDL2
|
SDL2pp::Texture lock. More...
#include <SDL2pp/Texture.hh>
Public Member Functions | |
LockHandle () | |
Create no-op lock. | |
~LockHandle () | |
Destructor. | |
LockHandle (LockHandle &&other) noexcept | |
Move constructor. | |
LockHandle & | operator= (LockHandle &&other) noexcept |
Move assignment operator. | |
LockHandle (const LockHandle &other)=delete | |
Deleted copy constructor. | |
LockHandle & | operator= (const LockHandle &other)=delete |
Deleted assignment operator. | |
void * | GetPixels () const |
Get pointer to raw pixel data of locked region. | |
int | GetPitch () const |
Get pitch of locked pixel data. | |
Friends | |
class | Texture |
SDL2pp::Texture lock.
Textures with SDL_TEXTUREACCESS_STREAMING access mode may be locked, which provides (writeonly) access to their raw pixel data. This may be used to update texture contents.
This class represents the lock and controls its lifetime as the lock is released as soon as LockHandle is destroyed.
Usage example:
SDL2pp::Texture::LockHandle::LockHandle | ( | ) |
Create no-op lock.
This may be initialized with real lock later via move assignment
SDL2pp::Texture::LockHandle::~LockHandle | ( | ) |
|
noexcept |
Move constructor.
[in] | other | SDL2pp::Texture::LockHandle to move data from |
|
delete |
Deleted copy constructor.
This class is not copyable
int SDL2pp::Texture::LockHandle::GetPitch | ( | ) | const |
Get pitch of locked pixel data.
void * SDL2pp::Texture::LockHandle::GetPixels | ( | ) | const |
Get pointer to raw pixel data of locked region.
|
delete |
Deleted assignment operator.
This class is not copyable
|
noexcept |
Move assignment operator.
[in] | other | SDL2pp::Texture::LockHandle to move data from |