Equalizer
1.13.0
Parallel Rendering Framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
compressorReadDrawPixels.h
1
2
/* Copyright (c) 2010, Cedric Stalder <cedric.stalder@gmail.com>
3
* 2010-2014, 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_COMPRESSORREADDRAWPIXELS
20
#define EQ_PLUGIN_COMPRESSORREADDRAWPIXELS
21
22
#include "
compressor.h
"
23
#include <
eq/gl.h
>
24
#include <eq/util/types.h>
25
26
namespace
eq
27
{
28
namespace
plugin
29
{
30
31
enum
FlushMode
32
{
33
FLUSH_TEXTURE,
34
KEEP_TEXTURE
35
};
36
37
class
CompressorReadDrawPixels
:
public
Compressor
38
{
39
public
:
40
explicit
CompressorReadDrawPixels
(
const
unsigned
name );
41
virtual
~
CompressorReadDrawPixels
();
42
43
static
void
* getNewCompressor(
const
unsigned
name )
44
{
return
new
CompressorReadDrawPixels
( name ); }
45
46
static
void
* getNewDecompressor(
const
unsigned
name )
47
{
return
new
CompressorReadDrawPixels
( name ); }
48
49
void
compress
(
const
void
*
const
,
const
eq_uint64_t,
const
bool
)
override
50
{ LBDONTCALL; }
51
52
static
bool
isCompatible(
const
GLEWContext* );
53
54
void
download(
const
GLEWContext*,
const
eq_uint64_t*,
const
unsigned
,
55
const
eq_uint64_t, eq_uint64_t*,
void
** )
override
;
56
57
void
upload(
const
GLEWContext*,
const
void
*,
const
eq_uint64_t*,
58
const
eq_uint64_t,
const
eq_uint64_t*,
59
const
unsigned
)
override
;
60
61
void
startDownload(
const
GLEWContext*,
const
eq_uint64_t*,
const
unsigned
,
62
const
eq_uint64_t)
override
;
63
64
void
finishDownload(
const
GLEWContext*,
const
eq_uint64_t*,
65
const
eq_uint64_t, eq_uint64_t*,
void
** )
override
;
66
67
protected
:
68
lunchbox::Bufferb _buffer;
69
util::Texture
* _texture;
70
util::PixelBufferObject
* _pbo;
71
unsigned
_internalFormat
;
72
unsigned
_format
;
73
unsigned
_type
;
74
const
unsigned
_depth
;
75
76
void
_resizeBuffer(
const
eq_uint64_t );
77
void
_initTexture(
const
GLEWContext*,
const
eq_uint64_t );
78
void
_initAsyncTexture(
const
GLEWContext*,
const
eq_uint64_t,
79
const
eq_uint64_t );
80
bool
_initPBO(
const
GLEWContext*,
const
eq_uint64_t );
81
void
_initDownload(
const
GLEWContext*,
const
eq_uint64_t*, eq_uint64_t* );
82
void
* _downloadTexture(
const
GLEWContext* glewContext,
83
const
FlushMode mode );
84
};
85
86
}
87
}
88
#endif // EQ_PLUGIN_COMPRESSORREADDRAWPIXELS
eq::plugin::CompressorReadDrawPixels
Definition:
compressorReadDrawPixels.h:37
eq::util::PixelBufferObject
A C++ class to abstract OpenGL pixel buffer objects.
Definition:
pixelBufferObject.h:44
eq::plugin::CompressorReadDrawPixels::_format
unsigned _format
the GL format
Definition:
compressorReadDrawPixels.h:72
eq::util::Texture
A wrapper around OpenGL textures.
Definition:
texture.h:38
eq::plugin::Compressor
Definition:
compressor.h:35
eq::plugin::CompressorReadDrawPixels::_depth
const unsigned _depth
the size of one output token
Definition:
compressorReadDrawPixels.h:74
eq
The Equalizer client library.
Definition:
eq/agl/types.h:23
eq::plugin::CompressorReadDrawPixels::_internalFormat
unsigned _internalFormat
the GL format
Definition:
compressorReadDrawPixels.h:71
compressor.h
Compression plugin provided with Equalizer.
eq::plugin::CompressorReadDrawPixels::_type
unsigned _type
the GL type
Definition:
compressorReadDrawPixels.h:73
gl.h
Includes OpenGL and GLEW headers.
eq::plugin::CompressorReadDrawPixels::compress
void compress(const void *const, const eq_uint64_t, const bool) override
Compress data.
Definition:
compressorReadDrawPixels.h:49
install
include
eq
compressor
compressorReadDrawPixels.h
Generated on Thu Sep 29 2016 05:00:32 for Equalizer by
1.8.9.1