Cogs.Core
|
Wrapper for mapped texture data, ensuring RAII behavior of stream map/unmap operations. More...
#include <Texture.h>
Public Member Functions | |
MappedTexture (Texture *texture, Element *data) | |
Constructs a texture data wrapper. | |
MappedTexture (MappedTexture &other)=delete | |
Deleted copy constructor. | |
MappedTexture (MappedTexture &&other)=default | |
Move construct the wrapper from other. | |
~MappedTexture () | |
Destructs the texture wrapper. | |
Element & | operator[] (const size_t index) |
Access the element at offset index. | |
operator Element * () | |
Cast the wrapper to a Element pointer, returning the held data pointer. | |
Element * | data () |
Get the pointer to the mapped data. | |
Private Attributes | |
Element * | elements |
Pointer to the mapped data. | |
Texture * | texture |
Pointer to the texture the data was mapped from. | |
Wrapper for mapped texture data, ensuring RAII behavior of stream map/unmap operations.
|
inline |
Cogs::Core::MappedTexture< Element >::~MappedTexture |
|
inline |
Get the pointer to the mapped data.
Definition at line 66 of file Texture.h.
References Cogs::Core::MappedTexture< Element >::elements.
Referenced by Cogs::Core::MappedTexture< Element >::operator Element *().
|
inlineexplicit |
Cast the wrapper to a Element pointer, returning the held data pointer.
Definition at line 63 of file Texture.h.
References Cogs::Core::MappedTexture< Element >::data().
|
inline |
Access the element at offset index.
Definition at line 57 of file Texture.h.
References Cogs::Core::MappedTexture< Element >::elements.
|
private |
Pointer to the mapped data.
Definition at line 70 of file Texture.h.
Referenced by Cogs::Core::MappedTexture< Element >::data(), and Cogs::Core::MappedTexture< Element >::operator[]().
|
private |