167 #ifndef EQ_PLUGINS_COMPRESSOR 
  168 #define EQ_PLUGINS_COMPRESSOR 
  171 #include <sys/types.h> 
  172 struct GLEWContextStruct;
 
  173 struct WGLEWContextStruct;
 
  174 typedef struct GLEWContextStruct GLEWContext;
 
  175 typedef struct WGLEWContextStruct WGLEWContext;
 
  176 typedef unsigned long long eq_uint64_t;
 
  179 #  ifdef EQ_PLUGIN_BUILD 
  180 #    define EQ_PLUGIN_API __declspec(dllexport) 
  182 #    define EQ_PLUGIN_API __declspec(dllimport) 
  185 #  define EQ_PLUGIN_API __attribute__ ((visibility("default"))) 
  192 #define EQ_COMPRESSOR_VERSION 4 
  194 #define EQ_COMPRESSOR_VERSION_1 1 
  196 #define EQ_COMPRESSOR_VERSION_2 1 
  198 #define EQ_COMPRESSOR_VERSION_3 1 
  200 #define EQ_COMPRESSOR_VERSION_4 1 
  223     #define EQ_COMPRESSOR_INPLACE    0x1 
  229     #define EQ_COMPRESSOR_DATA_1D    0x2 
  236     #define EQ_COMPRESSOR_DATA_2D    0x4 
  254     #define EQ_COMPRESSOR_IGNORE_ALPHA 0x8 
  256     #define EQ_COMPRESSOR_IGNORE_MSE EQ_COMPRESSOR_IGNORE_ALPHA 
  264     #define EQ_COMPRESSOR_CPU 0 
  272     #define EQ_COMPRESSOR_TRANSFER 0x10 
  280     #define EQ_COMPRESSOR_USE_TEXTURE_RECT 0x20 
  287     #define EQ_COMPRESSOR_USE_TEXTURE_2D 0x80 
  294     #define EQ_COMPRESSOR_USE_FRAMEBUFFER 0x40 
  302     #define EQ_COMPRESSOR_USE_ASYNC_DOWNLOAD 0x100 
  304 #if 0 // Not implemented yet 
  311     #define EQ_COMPRESSOR_USE_ASYNC_UPLOAD 0x200 
  472                                              const eq_uint64_t* inDims,
 
  473                                              const eq_uint64_t flags );
 
  487                                                       const unsigned name );
 
  503                                               eq_uint64_t* 
const outSize );
 
  527                                                const void* 
const* in,
 
  528                                                const eq_uint64_t* 
const inSizes,
 
  529                                                const unsigned numInputs,
 
  531                                                eq_uint64_t* 
const outDims,
 
  532                                                const eq_uint64_t flags );
 
  552                                                const GLEWContext* glewContext );
 
  604                                              const GLEWContext* glewContext,
 
  605                                              const eq_uint64_t  inDims[4],
 
  606                                              const unsigned     source,
 
  607                                              const eq_uint64_t  flags,
 
  608                                              eq_uint64_t        outDims[4],
 
  637                                                  const GLEWContext* glewContext,
 
  638                                                   const eq_uint64_t  inDims[4],
 
  639                                                   const unsigned     source,
 
  640                                                   const eq_uint64_t  flags );
 
  661                                                  const GLEWContext* glewContext,
 
  662                                                    const eq_uint64_t  inDims[4],
 
  663                                                    const eq_uint64_t  flags,
 
  664                                                    eq_uint64_t outDims[4],
 
  711                                            const GLEWContext* glewContext,
 
  713                                            const eq_uint64_t  inDims[4],
 
  714                                            const eq_uint64_t  flags,
 
  715                                            const eq_uint64_t  outDims[4],
 
  716                                            const unsigned     destination );
 
  725 inline std::ostream& operator << ( std::ostream& os,
 
  728     return os << std::hex << 
"name 0x" << info.
name << 
" in 0x" 
  730               << 
" cap 0x" << info.
capabilities << std::dec << 
" quality " 
  735 #endif // EQ_PLUGINS_COMPRESSOR 
unsigned outputTokenType
The output token type of a plugin. 
EQ_PLUGIN_API void EqCompressorCompress(void *const compressor, const unsigned name, void *const in, const eq_uint64_t *inDims, const eq_uint64_t flags)
Compress data. 
EQ_PLUGIN_API void EqCompressorGetResult(void *const compressor, const unsigned name, const unsigned i, void **const out, eq_uint64_t *const outSize)
Return the ith result of the last compression. 
unsigned version
The compressor API version used. 
unsigned outputTokenSize
The size of one output token in bytes. 
EQ_PLUGIN_API void EqCompressorStartDownload(void *const compressor, const unsigned name, const GLEWContext *glewContext, const eq_uint64_t inDims[4], const unsigned source, const eq_uint64_t flags)
Start transferring frame buffer data into main memory. 
float speed
Approximate compression speed relative to BYTE_RLE. 
EQ_PLUGIN_API void * EqCompressorNewCompressor(const unsigned name)
Instantiate a new compressor or a new downloader. 
Input and output token type definitions for compression plugins. 
EQ_PLUGIN_API bool EqCompressorIsCompatible(const unsigned name, const GLEWContext *glewContext)
Check if the compressor may be used with the current OpenGL context. 
unsigned tokenType
The input token type supported by the compressor. 
Information about one compressor. 
EQ_PLUGIN_API size_t EqCompressorGetNumCompressors()
EQ_PLUGIN_API void * EqCompressorNewDecompressor(const unsigned name)
Instantiate a new decompressor or a new uploader. 
EQ_PLUGIN_API unsigned EqCompressorGetNumResults(void *const compressor, const unsigned name)
Return the number of results produced by the last compression. 
float quality
Compression quality (1.0f: loss-less, <1.0f: lossy). 
EQ_PLUGIN_API void EqCompressorGetInfo(const size_t n, EqCompressorInfo *const info)
Query information of the nth compressor in the DSO. 
EQ_PLUGIN_API void EqCompressorDecompress(void *const decompressor, const unsigned name, const void *const *in, const eq_uint64_t *const inSizes, const unsigned numInputs, void *const out, eq_uint64_t *const outDims, const eq_uint64_t flags)
Decompress data. 
EQ_PLUGIN_API void EqCompressorDeleteCompressor(void *const compressor)
Release a compressor or downloader instance. 
EQ_PLUGIN_API void EqCompressorDeleteDecompressor(void *const decompressor)
Release a decompressor instance. 
EQ_PLUGIN_API void EqCompressorUpload(void *const decompressor, const unsigned name, const GLEWContext *glewContext, const void *buffer, const eq_uint64_t inDims[4], const eq_uint64_t flags, const eq_uint64_t outDims[4], const unsigned destination)
Transfer data from main memory into GPU memory. 
EQ_PLUGIN_API void EqCompressorFinishDownload(void *const compressor, const unsigned name, const GLEWContext *glewContext, const eq_uint64_t inDims[4], const eq_uint64_t flags, eq_uint64_t outDims[4], void **out)
Finish transferring frame buffer data into main memory. 
unsigned name
The type name of the compressor. 
EQ_PLUGIN_API void EqCompressorDownload(void *const compressor, const unsigned name, const GLEWContext *glewContext, const eq_uint64_t inDims[4], const unsigned source, const eq_uint64_t flags, eq_uint64_t outDims[4], void **out)
Transfer frame buffer data into main memory. 
Compression plugin names. 
eq_uint64_t capabilities
Capabilities supported by the compressor. 
float ratio
Approximate compression ratio (sizeCompressed/sizeIn).