Pression  1.2.0
Compressor, decompressor, uploader and downloader plugins
pression::Uploader Class Reference

A C++ class to handle one uploader plugin instance. More...

#include <uploader.h>

+ Collaboration diagram for pression::Uploader:

Public Member Functions

 Uploader ()
 Construct a new, invalid uploader instance. More...
 
 Uploader (PluginRegistry &from, const uint32_t name)
 Construct a new, named uploader instance. More...
 
virtual ~Uploader ()
 Destruct this uploader. More...
 
bool isGood (const GLEWContext *gl) const
 
bool uses (const uint32_t name) const
 
bool supports (const uint32_t externalFormat, const uint32_t internalFormat, const uint64_t capabilities, const GLEWContext *gl) const
 
const EqCompressorInfogetInfo () const
 
bool setup (PluginRegistry &from, const uint32_t name)
 Set up a new, named uploader instance. More...
 
bool setup (PluginRegistry &from, const uint32_t externalFormat, const uint32_t internalFormat, const uint64_t capabilities, const GLEWContext *gl)
 Set up a new, auto-selected uploader instance. More...
 
void clear ()
 Reset to EQ_COMPRESSOR_NONE. More...
 
void upload (const void *buffer, const uint64_t inDims[4], const uint64_t flags, const uint64_t outDims[4], const unsigned destination, const GLEWContext *gl)
 Upload data from cpu to the frame buffer or texture. More...
 

Static Public Member Functions

static uint32_t choose (const PluginRegistry &from, const uint32_t externalFormat, const uint32_t internalFormat, const uint64_t capabilities, const GLEWContext *gl)
 Find the best uploader in all plugins for the given parameters. More...
 

Detailed Description

A C++ class to handle one uploader plugin instance.

Definition at line 32 of file uploader.h.

Constructor & Destructor Documentation

pression::Uploader::Uploader ( )

Construct a new, invalid uploader instance.

Version
1.7.1
pression::Uploader::Uploader ( PluginRegistry from,
const uint32_t  name 
)

Construct a new, named uploader instance.

Parameters
fromthe plugin registry.
namethe name of the uploader.
Version
1.7.1
virtual pression::Uploader::~Uploader ( )
virtual

Destruct this uploader.

Version
1.7.1

Member Function Documentation

static uint32_t pression::Uploader::choose ( const PluginRegistry from,
const uint32_t  externalFormat,
const uint32_t  internalFormat,
const uint64_t  capabilities,
const GLEWContext *  gl 
)
static

Find the best uploader in all plugins for the given parameters.

This convenience method searches all compressors in all plugins to find the uploader which supports the given parameters and provides the highest speed.

Version
1.7.1
void pression::Uploader::clear ( )

Reset to EQ_COMPRESSOR_NONE.

Version
1.7.1
const EqCompressorInfo& pression::Uploader::getInfo ( ) const
Returns
the information about the allocated uploader.
Version
1.7.1
bool pression::Uploader::isGood ( const GLEWContext *  gl) const
Returns
true if the instance is usable.
Version
1.7.1
bool pression::Uploader::setup ( PluginRegistry from,
const uint32_t  name 
)

Set up a new, named uploader instance.

Parameters
fromthe plugin registry
namethe name of the uploader
Returns
true on success, false otherwise.
Version
1.7.1
bool pression::Uploader::setup ( PluginRegistry from,
const uint32_t  externalFormat,
const uint32_t  internalFormat,
const uint64_t  capabilities,
const GLEWContext *  gl 
)

Set up a new, auto-selected uploader instance.

See also
choose() for parameters.
Version
1.7.1
bool pression::Uploader::supports ( const uint32_t  externalFormat,
const uint32_t  internalFormat,
const uint64_t  capabilities,
const GLEWContext *  gl 
) const
Returns
true if the uploader supports the given parameters.
Version
1.7.1
void pression::Uploader::upload ( const void *  buffer,
const uint64_t  inDims[4],
const uint64_t  flags,
const uint64_t  outDims[4],
const unsigned  destination,
const GLEWContext *  gl 
)

Upload data from cpu to the frame buffer or texture.

Parameters
bufferdata source
inDimsthe dimensions of the input data
flagscapability flags for the compression
outDimsthe dimensions of the output data
destinationthe destination texture name, or 0 for framebuffer
glthe OpenGL function table
Version
1.7.1
bool pression::Uploader::uses ( const uint32_t  name) const
Returns
true if the instance is usable for the given name.
Version
1.7.1

The documentation for this class was generated from the following file: