Equalizer  1.4.1
pixelBufferObject.h
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 
00043     class PixelBufferObject 
00044     {
00045     public:
00053         EQ_API PixelBufferObject( const GLEWContext* glewContext,
00054                                   const bool threadSafe );
00055 
00057         EQ_API virtual ~PixelBufferObject();
00058 
00069         EQ_API virtual bool setup( const size_t size, const unsigned type );
00070 
00072         EQ_API virtual void destroy();
00073 
00080         EQ_API virtual const void* mapRead() const;
00081 
00088         EQ_API virtual void* mapWrite();
00089 
00096         EQ_API virtual void unmap() const;
00097 
00099         EQ_API virtual bool bind() const;
00100 
00102         EQ_API virtual void unbind() const;
00103 
00105         EQ_API size_t getSize() const;
00106 
00108         EQ_API const co::Error& getError() const;
00109 
00111         EQ_API bool isInitialized() const;
00112 
00114         EQ_API bool isThreadSafe() const;
00115 
00117         unsigned getID() const;
00118 
00119     private:
00120         detail::PixelBufferObject* const _impl;
00121     };
00122 }
00123 }
00124 
00125 #endif // EQUTIL_PIXELBUFFEROBJECT_H 
Generated on Mon Nov 26 2012 14:41:49 for Equalizer 1.4.1 by  doxygen 1.7.6.1