A slot managed by a GPUTileStorage. More...
#include <GPUTileStorage.h>
Public Member Functions | |
GPUSlot (TileStorage *owner, int index, ptr< Texture2DArray > t, int l) | |
Creates a new GPUSlot. | |
virtual | ~GPUSlot () |
Deletes this GPUSlot. | |
virtual void | copyPixels (ptr< FrameBuffer > fb, int x, int y, int w, int h) |
Copies a region of the given frame buffer into this slot. | |
virtual void | setSubImage (int x, int y, int w, int h, TextureFormat f, PixelType t, const Buffer::Parameters &s, const Buffer &pixels) |
Copies a region of the given pixel buffer into this slot. | |
Public Attributes | |
ptr< Texture2DArray > | t |
The 2D array texture containing the tile stored in this slot. | |
const int | l |
The layer of the tile in the 2D texture array 't'. | |
Private Attributes | |
int | index |
The index of 't' in the list of textures managed by the tile storage. |
A slot managed by a GPUTileStorage.
Corresponds to a layer of a texture.
proland::GPUTileStorage::GPUSlot::GPUSlot | ( | TileStorage * | owner, | |
int | index, | |||
ptr< Texture2DArray > | t, | |||
int | l | |||
) |
Creates a new GPUSlot.
owner | the TileStorage that manages this slot. | |
index | the index of t in the list of textures managed by the tile storage. | |
t | the 2D array texture in which the tile is stored. | |
l | the layer of the tile in the 2D texture array t. |
virtual proland::GPUTileStorage::GPUSlot::~GPUSlot | ( | ) | [virtual] |
Deletes this GPUSlot.
virtual void proland::GPUTileStorage::GPUSlot::copyPixels | ( | ptr< FrameBuffer > | fb, | |
int | x, | |||
int | y, | |||
int | w, | |||
int | h | |||
) | [virtual] |
Copies a region of the given frame buffer into this slot.
fb | a frame buffer. | |
x | lower left corner of the area where the pixels must be read. | |
y | lower left corner of the area where the pixels must be read. | |
w | width of the area where the pixels must be read. | |
h | height of the area where the pixels must be read. |
virtual void proland::GPUTileStorage::GPUSlot::setSubImage | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h, | |||
TextureFormat | f, | |||
PixelType | t, | |||
const Buffer::Parameters & | s, | |||
const Buffer & | pixels | |||
) | [virtual] |
Copies a region of the given pixel buffer into this slot.
The region Coordinates are relative to the lower left corner of the slot.
x | lower left corner of the part to be replaced in this slot. | |
y | lower left corner of the part to be replaced in this slot. | |
w | the width of the part to be replaced in this slot. | |
h | the height of the part to be replaced in this slot. | |
f | the texture components in 'pixels'. | |
t | the type of each component in 'pixels'. | |
pixels | the pixels to be copied into this slot. |
int proland::GPUTileStorage::GPUSlot::index [private] |
The index of 't' in the list of textures managed by the tile storage.
const int proland::GPUTileStorage::GPUSlot::l |
The layer of the tile in the 2D texture array 't'.
ptr<Texture2DArray> proland::GPUTileStorage::GPUSlot::t |
The 2D array texture containing the tile stored in this slot.