proland::GPUTileStorage::GPUSlot Class Reference

A slot managed by a GPUTileStorage. More...

#include <GPUTileStorage.h>

List of all members.

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.

Detailed Description

A slot managed by a GPUTileStorage.

Corresponds to a layer of a texture.


Constructor & Destructor Documentation

proland::GPUTileStorage::GPUSlot::GPUSlot ( TileStorage owner,
int  index,
ptr< Texture2DArray >  t,
int  l 
)

Creates a new GPUSlot.

Parameters:
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.


Member Function Documentation

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.

Parameters:
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.

Parameters:
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.

Member Data Documentation

The index of 't' in the list of textures managed by the tile storage.

The layer of the tile in the 2D texture array 't'.

The 2D array texture containing the tile stored in this slot.


Generated on Sat May 12 09:41:37 2012 for proland by  doxygen 1.6.1