Equalizer 1.0

systemWindow.h

00001 
00002 /* Copyright (c) 2005-2011, Stefan Eilemann <eile@equalizergraphics.com>
00003  *                    2009, Maxim Makhinya
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 EQ_SYSTEM_WINDOW_H
00020 #define EQ_SYSTEM_WINDOW_H
00021 
00022 #include <eq/types.h>
00023 #include <eq/window.h>         // Window::IAttribute enum
00024 
00025 namespace eq
00026 {
00027 namespace util
00028 {
00029     class FrameBufferObject;
00030 }
00031 
00040     class SystemWindow
00041     {
00042     public:
00044         EQ_API SystemWindow( Window* parent );
00045 
00047         EQ_API virtual ~SystemWindow();
00048         
00061         EQ_API virtual bool configInit() = 0;
00062 
00071         EQ_API virtual void configExit() = 0;
00072 
00081         EQ_API virtual void makeCurrent() const = 0;
00082 
00084         EQ_API virtual void bindFrameBuffer() const = 0;
00085 
00087         EQ_API virtual void swapBuffers() = 0;
00088 
00099         EQ_API virtual void joinNVSwapBarrier( const uint32_t group,
00100                                                const uint32_t barrier ) = 0;
00102 
00106         EQ_API bool configInitFBO();
00107 
00109         EQ_API void configExitFBO();
00110 
00112         virtual const util::FrameBufferObject* getFrameBufferObject()
00113             const { return 0; }
00115 
00119         Window* getWindow() { return _window; }
00120 
00122         const Window* getWindow() const { return _window; }
00123 
00125         EQ_API Pipe* getPipe();
00126 
00128         EQ_API const Pipe* getPipe() const;
00129 
00131         EQ_API Node* getNode();
00132 
00134         EQ_API const Node* getNode() const;
00135 
00137         EQ_API Config* getConfig();
00138 
00140         EQ_API const Config* getConfig() const;
00141 
00143         EQ_API int32_t getIAttribute( const Window::IAttribute attr ) const;
00145 
00150         EQ_API virtual void queryDrawableConfig( DrawableConfig& dc ) = 0;
00151 
00166         virtual const GLEWContext* glewGetContext() const { return 0; }
00167 
00176         EQ_API void setError( const int32_t error );
00177 
00179         EQ_API co::base::Error getError() const;
00180 
00182         EQ_API virtual bool processEvent( const Event& event );
00183 
00184     private:
00186         Window* const _window;
00187         
00188         struct Private;
00189         Private* _private; // placeholder for binary-compatible changes
00190     };
00191 }
00192 
00193 
00194 #endif // EQ_SYSTEM_WINDOW_H
00195 
Generated on Sun May 8 2011 19:11:07 for Equalizer 1.0 by  doxygen 1.7.3