LCOV - code coverage report
Current view: top level - eq/client/compressor - compressorYUV.h (source / functions) Hit Total Coverage
Test: lcov2.info Lines: 0 6 0.0 %
Date: 2014-06-18 Functions: 0 3 0.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2009, Cedric Stalder <cedric.stalder@gmail.com>
       3             :  *               2013, Stefan Eilemann <eile@eyescale.ch>
       4             :  *
       5             :  * This library is free software; you can redistribute it and/or modify it under
       6             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       7             :  * by the Free Software Foundation.
       8             :  *
       9             :  * This library is distributed in the hope that it will be useful, but WITHOUT
      10             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      11             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      12             :  * details.
      13             :  *
      14             :  * You should have received a copy of the GNU Lesser General Public License
      15             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      16             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      17             :  */
      18             : 
      19             : #ifndef EQ_PLUGIN_COMPRESSORYUV
      20             : #define EQ_PLUGIN_COMPRESSORYUV
      21             : 
      22             : #include "compressor.h"
      23             : 
      24             : #include <eq/util/texture.h>
      25             : #include <eq/client/gl.h>
      26             : #include <eq/util/types.h>
      27             : #include <lunchbox/buffer.h>
      28             : 
      29             : namespace eq
      30             : {
      31             : namespace plugin
      32             : {
      33             : 
      34             : class CompressorYUV : public Compressor
      35             : {
      36             : public:
      37             :     CompressorYUV();
      38             :     virtual ~CompressorYUV();
      39             : 
      40           0 :     static void* getNewCompressor( const unsigned )
      41           0 :         { return new CompressorYUV; }
      42           0 :     static void* getNewDecompressor( const unsigned )
      43           0 :         { return new CompressorYUV; }
      44             : 
      45           0 :     virtual void compress( const void* const, const uint64_t, const bool )
      46           0 :         { LBDONTCALL; }
      47             : 
      48             :     static bool isCompatible( const GLEWContext* );
      49             : 
      50             :     void download( const GLEWContext*, const eq_uint64_t*, const unsigned,
      51             :                    const eq_uint64_t, eq_uint64_t*, void** ) override;
      52             : 
      53             :     void upload( const GLEWContext*, const void*, const eq_uint64_t*,
      54             :                  const eq_uint64_t, const eq_uint64_t*,
      55             :                  const unsigned ) override;
      56             : 
      57             : protected:
      58             :     GLuint   _program;
      59             :     lunchbox::Bufferb buffer;
      60             : 
      61             : private:
      62             :     void _initShader( const GLEWContext*, const char* );
      63             :     void _compress( const GLEWContext*, const eq_uint64_t*, eq_uint64_t* );
      64             :     void _decompress( const GLEWContext*, const eq_uint64_t* );
      65             :     void _download( void* );
      66             : 
      67             :     util::FrameBufferObject* _fbo;
      68             :     util::Texture* _texture;
      69             : 
      70             : };
      71             : 
      72             : }
      73             : }
      74             : #endif //EQ_PLUGIN_COMPRESSORYUV

Generated by: LCOV version 1.10