19 #ifndef EQ_PLUGIN_COMPRESSOR 20 #define EQ_PLUGIN_COMPRESSOR 22 #include <pression/plugins/compressor.h> 23 #include <lunchbox/buffer.h> 38 typedef void (*CompressorGetInfo_t)( EqCompressorInfo* const );
39 typedef void* (*NewCompressor_t)(
const unsigned );
40 typedef void (*Decompress_t)(
const void*
const*,
const 42 const unsigned,
void*
const,
43 const eq_uint64_t,
const bool );
44 typedef bool ( *IsCompatible_t ) (
const GLEWContext* );
48 Functions(
const unsigned name, CompressorGetInfo_t getInfo,
49 NewCompressor_t newCompressor,
50 NewCompressor_t newDecompressor,
51 Decompress_t decompress, IsCompatible_t isCompatible );
54 CompressorGetInfo_t getInfo;
55 NewCompressor_t newCompressor;
56 NewCompressor_t newDecompressor;
57 Decompress_t decompress;
58 IsCompatible_t isCompatible;
72 virtual void compress(
const void*
const inData LB_UNUSED,
73 const eq_uint64_t nPixels LB_UNUSED,
74 const bool useAlpha LB_UNUSED ) { LBDONTCALL; }
76 typedef lunchbox::Bufferb Result;
77 typedef std::vector< Result* > Results;
96 virtual void download(
const GLEWContext* glewContext LB_UNUSED,
97 const eq_uint64_t inDims[4] LB_UNUSED,
98 const unsigned source LB_UNUSED,
99 const eq_uint64_t flags LB_UNUSED,
100 eq_uint64_t outDims[4] LB_UNUSED,
101 void** out LB_UNUSED ) { LBDONTCALL; }
114 virtual void upload(
const GLEWContext* glewContext LB_UNUSED,
115 const void* buffer LB_UNUSED,
116 const eq_uint64_t inDims[4] LB_UNUSED,
117 const eq_uint64_t flags LB_UNUSED,
118 const eq_uint64_t outDims[4] LB_UNUSED,
119 const unsigned destination LB_UNUSED )
134 const eq_uint64_t inDims[4] LB_UNUSED,
135 const unsigned source LB_UNUSED,
136 const eq_uint64_t flags LB_UNUSED )
151 const eq_uint64_t inDims[4] LB_UNUSED,
152 const eq_uint64_t flags LB_UNUSED,
153 eq_uint64_t outDims[4] LB_UNUSED,
154 void** out LB_UNUSED ) { LBDONTCALL; }
157 static void registerEngine(
const Functions& );
166 #endif // EQ_PLUGIN_COMPRESSOR const Results & getResults() const
Compressor()
Construct a new compressor.
virtual void upload(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.
virtual void compress(const void *const inData, const eq_uint64_t nPixels, const bool useAlpha)
Compress data.
virtual void finishDownload(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.
virtual void startDownload(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.
unsigned _nResults
Number of elements used in _results.
The Equalizer client library.
Results _results
The compressed data.
virtual void download(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.
unsigned getNResults() const