Equalizer
1.2.1
|
00001 00002 /* Copyright (c) 2012, Maxim Makhinya <maxmah@gmail.com> 00003 * 2012, Stefan Eilemann <eile@eyescale.ch> 00004 * 00005 * This library is free software; you can redistribute it and/or modify it under 00006 * the terms of the GNU Lesser General Public License version 2.1 as published 00007 * by the Free Software Foundation. 00008 * 00009 * This library is distributed in the hope that it will be useful, but WITHOUT 00010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00012 * details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with this library; if not, write to the Free Software Foundation, Inc., 00016 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00017 */ 00018 00019 #ifndef EQUTIL_PIXELBUFFEROBJECT_H 00020 #define EQUTIL_PIXELBUFFEROBJECT_H 00021 00022 #include <lunchbox/lock.h> 00023 00024 #include <eq/client/gl.h> // for GLEW 00025 #include <eq/client/types.h> 00026 00027 namespace eq 00028 { 00029 namespace util 00030 { 00031 namespace detail { class PixelBufferObject; } 00032 00044 class PixelBufferObject 00045 { 00046 public: 00054 EQ_API PixelBufferObject( const GLEWContext* glewContext, 00055 const bool threadSafe ); 00056 00058 EQ_API virtual ~PixelBufferObject(); 00059 00068 EQ_API virtual bool setup( const ssize_t size, const GLuint type ); 00069 00071 EQ_API virtual void destroy(); 00072 00079 EQ_API virtual const void* mapRead() const; 00080 00087 EQ_API virtual void* mapWrite(); 00088 00095 EQ_API virtual void unmap() const; 00096 00098 EQ_API virtual bool bind() const; 00099 00101 EQ_API virtual void unbind() const; 00102 00104 EQ_API ssize_t getSize() const; 00105 00107 EQ_API const co::Error& getError() const; 00108 00110 EQ_API bool isInitialized() const; 00111 00113 EQ_API bool isThreadSafe() const; 00114 00116 GLuint getID() const; 00117 00118 private: 00119 detail::PixelBufferObject* const _impl; 00120 }; 00121 } 00122 } 00123 00124 #endif // EQUTIL_PIXELBUFFEROBJECT_H