21 #ifndef LUNCHBOX_PLUGIN_H
22 #define LUNCHBOX_PLUGIN_H
25 #include <lunchbox/dso.h>
26 #include <lunchbox/visitorResult.h>
31 namespace detail {
class Plugin; }
42 LUNCHBOX_API
explicit Plugin(
const std::string& libraryName );
49 typedef size_t ( *GetNumCompressors_t ) ();
50 typedef void* ( *NewCompressor_t ) (
const unsigned );
51 typedef void ( *DeleteCompressor_t ) (
void* const );
52 typedef void* ( *NewDecompressor_t ) (
const unsigned );
53 typedef void ( *DeleteDecompressor_t ) (
void* const );
54 typedef void ( *Compress_t ) (
void*
const,
const unsigned,
55 void*
const,
const uint64_t*,
57 typedef unsigned ( *GetNumResults_t ) (
void*
const,
const unsigned );
58 typedef void ( *GetResult_t ) (
void*
const,
const unsigned,
59 const unsigned,
void**
const,
61 typedef void ( *Decompress_t ) (
void*
const,
const unsigned,
63 const uint64_t*
const,
64 const unsigned,
void*
const,
67 typedef bool ( *IsCompatible_t ) (
const unsigned,
const GLEWContext* );
68 typedef void ( *Download_t )(
void*
const,
const unsigned,
69 const GLEWContext*,
const uint64_t*,
70 const unsigned,
const uint64_t,
72 typedef void ( *StartDownload_t )(
void*
const,
const unsigned,
73 const GLEWContext*,
const uint64_t*,
74 const unsigned,
const uint64_t );
75 typedef void ( *FinishDownload_t )(
void*
const,
const unsigned,
76 const GLEWContext*,
const uint64_t*,
77 const uint64_t, uint64_t*,
void** );
78 typedef void ( *Upload_t )(
void*
const,
const unsigned,
79 const GLEWContext*,
const void*,
81 const uint64_t,
const uint64_t*,
88 LUNCHBOX_API
bool isGood()
const;
97 bool implementsType(
const uint32_t name )
const;
103 LUNCHBOX_API
const CompressorInfos& getInfos()
const;
152 detail::Plugin*
const impl_;
155 #endif //LUNCHBOX_PLUGIN_H
Helper to access dynamic shared objects (DSO)
IsCompatible_t const isCompatible
Check if the transfer plugin can be used.
LUNCHBOX_API VisitorResult accept(PluginVisitor &visitor)
Visit all compressors.
StartDownload_t const startDownload
Start downloading pixel data.
Basic type definitions not provided by the operating system.
DeleteCompressor_t const deleteCompressor
Delete the compressor instance.
The API to create runtime-loadable compression plugins.
GetNumResults_t const getNumResults
Get the number of results from the last compression.
GetResult_t const getResult
Get the nth result from the last compression.
LUNCHBOX_API Plugin(const std::string &libraryName)
Construct and initialize a new plugin DSO.
DeleteDecompressor_t const deleteDecompressor
Delete the decompressor instance.
Information about one compressor.
LUNCHBOX_API bool isGood() const
Visitor for all plugins and compressors of a Plugin or PluginRegistry.
GetNumCompressors_t const getNumCompressors
Get the number of engines found in the plugin.
NewCompressor_t const newCompressor
Get a new compressor instance.
NewDecompressor_t const newDecompressor
Get a new decompressor instance.
VisitorResult
The result code from any visit operation.
Download_t const download
Download pixel data.
Holder for all functions and information of one compression plugin DSO.
Upload_t const upload
Upload pixel data.
FinishDownload_t const finishDownload
Start downloading pixel data.
virtual LUNCHBOX_API ~Plugin()
Destruct this plugin handle.
Decompress_t const decompress
Decompress data.
Compress_t const compress
Compress data.