proland::OrthoGPUProducer Class Reference
[ortho]

A TileProducer to create texture tiles on GPU from CPU textures tiles. More...

#include <OrthoGPUProducer.h>

List of all members.

Public Member Functions

 OrthoGPUProducer (ptr< TileCache > cache, ptr< TileCache > backgroundCache, ptr< TileProducer > orthoTiles, int maxLevel=-1, ptr< Texture2D > compressedTexture=NULL, ptr< Texture2D > uncompressedTexture=NULL)
 Creates a new OrthoGPUProducer.
virtual ~OrthoGPUProducer ()
 Deletes this OrthoGPUProducer.

Protected Member Functions

 OrthoGPUProducer ()
 Creates an uninitialized OrthoGPUProducer.
void init (ptr< TileCache > cache, ptr< TileCache > backgroundCache, ptr< TileProducer > orthoTiles, int maxLevel=-1, ptr< Texture2D > compressedTexture=NULL, ptr< Texture2D > uncompressedTexture=NULL)
 Initializes this OrthoGPUProducer.

Private Attributes

ptr< TileProducer > orthoTiles
 The producer producing the CPU tiles.
ptr< TileProducer > coarseGpuTiles
 An intermediate OrthoGPUProducer to produce the CPU tiles to be enlarged to produce zoomed in versions.
int channels
 The number of components per pixel of the CPU tiles.
int tileSize
 The size of the produced tiles, including borders.
ptr< Texture2D > compressedTexture
 A texture used to copy the orthoTiles tiles to GPU, if they are stored in DXT format on CPU.
ptr< Texture2D > uncompressedTexture
 A texture used to uncompress tiles on GPU, or if orthoTiles are not compressed, to copy them directly to GPU.

Detailed Description

A TileProducer to create texture tiles on GPU from CPU textures tiles.

This producer simply copies the CPU texture data into GPU textures. This producer accepts layers, which can modify the raw CPU texture data, using shaders on GPU. If layers are used, this producer can produce tiles whose level is greater than the maximum level of the CPU tile producer, using an intermediate tile cache to store the CPU tiles to be enlarged to produce zoomed versions. In fact, if layers are used, the CPU tile producer is not mandatory: in this case tiles are produced enterily on GPU, using the layers alone.

Authors:
Eric Bruneton, Antoine Begault, Guillaume Piolat

Constructor & Destructor Documentation

proland::OrthoGPUProducer::OrthoGPUProducer ( ptr< TileCache >  cache,
ptr< TileCache >  backgroundCache,
ptr< TileProducer >  orthoTiles,
int  maxLevel = -1,
ptr< Texture2D >  compressedTexture = NULL,
ptr< Texture2D >  uncompressedTexture = NULL 
)

Creates a new OrthoGPUProducer.

Parameters:
cache the cache to store the produced tiles. The underlying storage must be a GPUTileStorage. The size of tiles in this storage size must be equal to the size of the tiles produced by orthoTiles.
backgroundCache an intermediate cache to store CPU tiles to be enlarged to produce zoomed in versions. Only necessary if layers are used, and if you want to produce tiles of level greater than the maximum level of orthoTiles.
orthoTiles the producer producing the CPU tiles. This producer should produce its tiles in a CPUTileStorage of unsigned byte type. Maybe NULL if layers are used (in this case tiles are produced enterily on GPU using the layers).
compressedTexture a texture used to copy the orthoTiles tiles to GPU, if they are stored in DXT format on CPU. Its size must be equal to the produced tile size (including borders), and its format equal to the DXT format used by orthoTiles. Maybe NULL if orthoTiles are not compressed.
uncompressedTexture a texture used to uncompress tiles on GPU, or if orthoTiles are not compressed, to copy them directly to GPU. Its size must be equal to the produced tile size (including borders).
virtual proland::OrthoGPUProducer::~OrthoGPUProducer (  )  [virtual]

Deletes this OrthoGPUProducer.

proland::OrthoGPUProducer::OrthoGPUProducer (  )  [protected]

Creates an uninitialized OrthoGPUProducer.


Member Function Documentation

void proland::OrthoGPUProducer::init ( ptr< TileCache >  cache,
ptr< TileCache >  backgroundCache,
ptr< TileProducer >  orthoTiles,
int  maxLevel = -1,
ptr< Texture2D >  compressedTexture = NULL,
ptr< Texture2D >  uncompressedTexture = NULL 
) [protected]

Initializes this OrthoGPUProducer.

See OrthoGPUProducer.


Member Data Documentation

The number of components per pixel of the CPU tiles.

ptr<TileProducer> proland::OrthoGPUProducer::coarseGpuTiles [private]

An intermediate OrthoGPUProducer to produce the CPU tiles to be enlarged to produce zoomed in versions.

Only necessary if layers are used, and if you want to produce tiles of level greater than the maximum level of orthoTiles.

A texture used to copy the orthoTiles tiles to GPU, if they are stored in DXT format on CPU.

ptr<TileProducer> proland::OrthoGPUProducer::orthoTiles [private]

The producer producing the CPU tiles.

This producer should produce its tiles in a CPUTileStorage of unsigned byte type. Maybe NULL if layers are used (in this case tiles are produced enterily on GPU using the layers).

The size of the produced tiles, including borders.

A texture used to uncompress tiles on GPU, or if orthoTiles are not compressed, to copy them directly to GPU.


Generated on Sat May 12 09:42:13 2012 for proland by  doxygen 1.6.1