A C++ class to handle one downloader plugin instance.
More...
#include <downloader.h>
|
LUNCHBOX_API | Downloader () |
| Construct a new, invalid downloader instance. More...
|
|
LUNCHBOX_API | Downloader (PluginRegistry &from, const uint32_t name, const GLEWContext *gl=0) |
| Construct a new, named downloader instance. More...
|
|
virtual LUNCHBOX_API | ~Downloader () |
| Destruct this downloader. More...
|
|
LUNCHBOX_API bool | isGood () const |
|
LUNCHBOX_API bool | uses (const uint32_t name) const |
|
LUNCHBOX_API bool | supports (const uint32_t inputToken, const bool noAlpha, const uint64_t capabilities) const |
|
LUNCHBOX_API const
EqCompressorInfo & | getInfo () const |
|
LUNCHBOX_API bool | setup (PluginRegistry &from, const uint32_t name, const GLEWContext *gl=0) |
| Set up a new, named downloader instance. More...
|
|
LUNCHBOX_API bool | setup (PluginRegistry &from, const uint32_t internalFormat, const float minQuality, const bool ignoreAlpha, const uint64_t capabilities, const GLEWContext *gl) |
| Set up a new, auto-selected downloader instance. More...
|
|
LUNCHBOX_API void | clear () |
| Reset to EQ_COMPRESSOR_NONE. More...
|
|
LUNCHBOX_API bool | start (void **buffer, const uint64_t inDims[4], const uint64_t flags, uint64_t outDims[4], const unsigned source, const GLEWContext *gl) |
| Start downloading data from the GPU to the CPU. More...
|
|
LUNCHBOX_API void | finish (void **buffer, const uint64_t inDims[4], const uint64_t flags, uint64_t outDims[4], const GLEWContext *gl) |
| Finish download data from the GPU to the CPU. More...
|
|
|
static LUNCHBOX_API uint32_t | choose (const PluginRegistry &from, const uint32_t internalFormat, const float minQuality, const bool ignoreAlpha, const uint64_t capabilities, const GLEWContext *gl) |
| Find the best downloader in all plugins for the given parameters. More...
|
|
A C++ class to handle one downloader plugin instance.
Definition at line 32 of file downloader.h.
LUNCHBOX_API lunchbox::Downloader::Downloader |
( |
| ) |
|
Construct a new, invalid downloader instance.
- Version
- 1.7.1
LUNCHBOX_API lunchbox::Downloader::Downloader |
( |
PluginRegistry & |
from, |
|
|
const uint32_t |
name, |
|
|
const GLEWContext * |
gl = 0 |
|
) |
| |
Construct a new, named downloader instance.
- Parameters
-
from | the plugin registry. |
name | the name of the downloader. |
gl | the OpenGL function table to verify that the plugin is compatible with this GL implementation. |
- Version
- 1.7.1
virtual LUNCHBOX_API lunchbox::Downloader::~Downloader |
( |
| ) |
|
|
virtual |
Destruct this downloader.
- Version
- 1.7.1
static LUNCHBOX_API uint32_t lunchbox::Downloader::choose |
( |
const PluginRegistry & |
from, |
|
|
const uint32_t |
internalFormat, |
|
|
const float |
minQuality, |
|
|
const bool |
ignoreAlpha, |
|
|
const uint64_t |
capabilities, |
|
|
const GLEWContext * |
gl |
|
) |
| |
|
static |
Find the best downloader in all plugins for the given parameters.
This convenience method searches all compressors in all plugins to find the downloader which supports the given parameters and provides the highest speed.
- Parameters
-
from | the plugin registry to choose from. |
internalFormat | the input token type to the downloader. |
minQuality | the minimum quality. |
ignoreAlpha | true if the downloader may drop the alpha channel. |
capabilities | the capabilities required by the downloader. |
gl | the OpenGL function table. |
- Returns
- the name of the chosen downloader.
- Version
- 1.7.1
LUNCHBOX_API void lunchbox::Downloader::clear |
( |
| ) |
|
Reset to EQ_COMPRESSOR_NONE.
- Version
- 1.7.1
LUNCHBOX_API void lunchbox::Downloader::finish |
( |
void ** |
buffer, |
|
|
const uint64_t |
inDims[4], |
|
|
const uint64_t |
flags, |
|
|
uint64_t |
outDims[4], |
|
|
const GLEWContext * |
gl |
|
) |
| |
Finish download data from the GPU to the CPU.
- Parameters
-
buffer | data destination buffer. |
inDims | the dimensions of the input data. |
flags | capability flags for the compression. |
outDims | return value for the dimensions of the output data. |
gl | the OpenGL function table. |
- Version
- 1.7.1
- Returns
- the information about the allocated instance.
- Version
- 1.7.1
LUNCHBOX_API bool lunchbox::Downloader::isGood |
( |
| ) |
const |
- Returns
- true if the instance is usable.
- Version
- 1.7.1
LUNCHBOX_API bool lunchbox::Downloader::setup |
( |
PluginRegistry & |
from, |
|
|
const uint32_t |
name, |
|
|
const GLEWContext * |
gl = 0 |
|
) |
| |
Set up a new, named downloader instance.
- Parameters
-
from | the plugin registry. |
name | the name of the downloader. |
gl | the OpenGL function table to verify that the plugin is compatible with this GL implementation. |
- Returns
- true on success, false otherwise.
- Version
- 1.7.1
LUNCHBOX_API bool lunchbox::Downloader::setup |
( |
PluginRegistry & |
from, |
|
|
const uint32_t |
internalFormat, |
|
|
const float |
minQuality, |
|
|
const bool |
ignoreAlpha, |
|
|
const uint64_t |
capabilities, |
|
|
const GLEWContext * |
gl |
|
) |
| |
Set up a new, auto-selected downloader instance.
- See Also
- choose() for parameters.
- Version
- 1.7.1
LUNCHBOX_API bool lunchbox::Downloader::start |
( |
void ** |
buffer, |
|
|
const uint64_t |
inDims[4], |
|
|
const uint64_t |
flags, |
|
|
uint64_t |
outDims[4], |
|
|
const unsigned |
source, |
|
|
const GLEWContext * |
gl |
|
) |
| |
Start downloading data from the GPU to the CPU.
- Parameters
-
buffer | data destination buffer. |
inDims | the dimensions of the input data. |
flags | capability flags for the compression. |
outDims | return value for the dimensions of the output data. |
source | the source texture name, or 0 for framebuffer. |
gl | the OpenGL function table. |
- Returns
- true if finish is needed, false if a synchronous download was performed.
- Version
- 1.7.1
LUNCHBOX_API bool lunchbox::Downloader::supports |
( |
const uint32_t |
inputToken, |
|
|
const bool |
noAlpha, |
|
|
const uint64_t |
capabilities |
|
) |
| const |
- Returns
- true if the download supports the given parameters.
- Version
- 1.7.1
LUNCHBOX_API bool lunchbox::Downloader::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: