21 #ifndef PRESSION_PLUGIN_H
22 #define PRESSION_PLUGIN_H
25 #include <pression/types.h>
28 #include <lunchbox/dso.h>
32 namespace detail {
class Plugin; }
43 PRESSION_API
explicit Plugin(
const std::string& libraryName );
50 typedef size_t ( *GetNumCompressors_t ) ();
51 typedef void* ( *NewCompressor_t ) (
const unsigned );
52 typedef void ( *DeleteCompressor_t ) (
void* const );
53 typedef void* ( *NewDecompressor_t ) (
const unsigned );
54 typedef void ( *DeleteDecompressor_t ) (
void* const );
55 typedef void ( *Compress_t ) (
void*
const,
const unsigned,
56 void*
const,
const uint64_t*,
58 typedef unsigned ( *GetNumResults_t ) (
void*
const,
const unsigned );
59 typedef void ( *GetResult_t ) (
void*
const,
const unsigned,
60 const unsigned,
void**
const,
62 typedef void ( *Decompress_t ) (
void*
const,
const unsigned,
64 const uint64_t*
const,
65 const unsigned,
void*
const,
68 typedef bool ( *IsCompatible_t ) (
const unsigned,
const GLEWContext* );
69 typedef void ( *Download_t )(
void*
const,
const unsigned,
70 const GLEWContext*,
const uint64_t*,
71 const unsigned,
const uint64_t,
73 typedef void ( *StartDownload_t )(
void*
const,
const unsigned,
74 const GLEWContext*,
const uint64_t*,
75 const unsigned,
const uint64_t );
76 typedef void ( *FinishDownload_t )(
void*
const,
const unsigned,
77 const GLEWContext*,
const uint64_t*,
78 const uint64_t, uint64_t*,
void** );
79 typedef void ( *Upload_t )(
void*
const,
const unsigned,
80 const GLEWContext*,
const void*,
82 const uint64_t,
const uint64_t*,
89 PRESSION_API
bool isGood()
const;
98 bool implementsType(
const uint32_t name )
const;
104 PRESSION_API
const CompressorInfos& getInfos()
const;
153 detail::Plugin*
const impl_;
156 #endif //PRESSION_PLUGIN_H
GetNumCompressors_t const getNumCompressors
Get the number of engines found in the plugin.
Download_t const download
Download pixel data.
Defines export visibility macros for library Pression.
Visitor for all plugins and compressors of a Plugin or PluginRegistry.
The API to create runtime-loadable compression plugins.
PRESSION_API VisitorResult accept(PluginVisitor &visitor)
Visit all compressors.
NewCompressor_t const newCompressor
Get a new compressor instance.
GetResult_t const getResult
Get the nth result from the last compression.
Holder for all functions and information of one compression plugin DSO.
Compress_t const compress
Compress data.
Upload_t const upload
Upload pixel data.
PRESSION_API bool isGood() const
Information about one compressor.
IsCompatible_t const isCompatible
Check if the transfer plugin can be used.
Decompress_t const decompress
Decompress data.
FinishDownload_t const finishDownload
Start downloading pixel data.
StartDownload_t const startDownload
Start downloading pixel data.
PRESSION_API Plugin(const std::string &libraryName)
Construct and initialize a new plugin DSO.
virtual PRESSION_API ~Plugin()
Destruct this plugin handle.
NewDecompressor_t const newDecompressor
Get a new decompressor instance.
DeleteCompressor_t const deleteCompressor
Delete the compressor instance.
GetNumResults_t const getNumResults
Get the number of results from the last compression.
DeleteDecompressor_t const deleteDecompressor
Delete the decompressor instance.