Equalizer  2.1.0
Parallel Rendering Framework
pixelBufferObject.h
1 
2 /* Copyright (c) 2012-2017, Maxim Makhinya <maxmah@gmail.com>
3  * 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 EQUTIL_PIXELBUFFEROBJECT_H
20 #define EQUTIL_PIXELBUFFEROBJECT_H
21 
22 #include <eq/api.h>
23 #include <eq/error.h> // enum
24 #include <eq/types.h>
25 
26 namespace eq
27 {
28 namespace util
29 {
30 namespace detail
31 {
32 class PixelBufferObject;
33 }
34 
46 {
47 public:
54  EQ_API PixelBufferObject(const GLEWContext* glewContext);
55 
57  EQ_API virtual ~PixelBufferObject();
58 
69  EQ_API virtual Error setup(const size_t size, const unsigned type);
70 
72  EQ_API virtual void destroy();
73 
80  EQ_API virtual const void* mapRead() const;
81 
88  EQ_API virtual void* mapWrite();
89 
96  EQ_API virtual void unmap() const;
97 
99  EQ_API virtual bool bind() const;
100 
102  EQ_API virtual void unbind() const;
103 
105  EQ_API size_t getSize() const;
106 
108  EQ_API bool isInitialized() const;
109 
111  unsigned getID() const;
112 
113 private:
114  PixelBufferObject(const PixelBufferObject&) = delete;
115  PixelBufferObject& operator=(const PixelBufferObject&) = delete;
116  detail::PixelBufferObject* const _impl;
117 };
118 }
119 }
120 
121 #endif // EQUTIL_PIXELBUFFEROBJECT_H
A C++ class to abstract OpenGL pixel buffer objects.
The Equalizer client library.
Definition: eq/agl/types.h:23