Equalizer  2.0.0
Parallel Rendering Framework
systemWindow.h
1 
2 /* Copyright (c) 2005-2016, Stefan Eilemann <eile@equalizergraphics.com>
3  * Daniel Nachbaur <danielnachbaur@gmail.com>
4  * Maxim Makhinya
5  *
6  * This library is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License version 2.1 as published
8  * by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef EQ_SYSTEM_WINDOW_H
21 #define EQ_SYSTEM_WINDOW_H
22 
23 #include <eq/types.h>
24 #include <eq/windowSettings.h> // WindowSettings::IAttribute enum
25 
26 namespace eq
27 {
36 {
37 public:
39  EQ_API SystemWindow( NotifierInterface& parent,
40  const WindowSettings& settings );
41 
43  EQ_API virtual ~SystemWindow();
44 
56  EQ_API virtual bool configInit() = 0;
57 
66  EQ_API virtual void configExit() = 0;
67 
74  EQ_API virtual void makeCurrent( const bool cache = true ) const = 0;
75 
82  EQ_API virtual void doneCurrent() const = 0;
83 
85  EQ_API virtual void bindFrameBuffer() const = 0;
86 
88  EQ_API virtual void bindDrawFrameBuffer() const = 0;
89 
91  EQ_API virtual void updateFrameBuffer() const = 0;
92 
94  EQ_API virtual void swapBuffers() = 0;
95 
97  EQ_API virtual void flush() = 0;
98 
100  EQ_API virtual void finish() = 0;
101 
112  EQ_API virtual void joinNVSwapBarrier( const uint32_t group,
113  const uint32_t barrier ) = 0;
115 
120  const { return 0; }
124 
129  EQ_API virtual void queryDrawableConfig( DrawableConfig& dc ) = 0;
130 
145  virtual const GLEWContext* glewGetContext() const { return 0; }
146 
153  EQ_API EventOCommand sendError( const uint32_t error );
154 
156  EQ_API bool processEvent( EventType type );
157 
159  EQ_API bool processEvent( EventType type, SizeEvent& event );
160 
162  EQ_API bool processEvent( EventType type, PointerEvent& event );
163 
165  EQ_API bool processEvent( EventType type, KeyEvent& event );
166 
168  EQ_API bool processEvent( EventType type, AxisEvent& event );
169 
171  EQ_API bool processEvent( EventType type, ButtonEvent& event );
172 
179  EQ_API void setPixelViewport( const PixelViewport& pvp );
180 
185  EQ_API const PixelViewport& getPixelViewport() const;
186 
192  EQ_API uint32_t getColorFormat() const;
193 
195  EQ_API void setName( const std::string& name );
196 
198  EQ_API const std::string& getName() const;
199 
201  EQ_API int32_t getIAttribute( const WindowSettings::IAttribute attr ) const;
202 
207  EQ_API const SystemWindow* getSharedContextWindow() const;
208 
209 private:
210  NotifierInterface& _parent;
211  WindowSettings _settings;
212 };
213 }
214 
215 
216 #endif // EQ_SYSTEM_WINDOW_H
virtual util::FrameBufferObject * getFrameBufferObject()
Definition: systemWindow.h:122
virtual EQ_API void updateFrameBuffer() const =0
Update the window&#39;s FBO from the multisampled FBO.
EQ_API EventOCommand sendError(const uint32_t error)
Send a window error event to the application node.
EQ_API int32_t getIAttribute(const WindowSettings::IAttribute attr) const
EQ_API const SystemWindow * getSharedContextWindow() const
EQ_API const std::string & getName() const
A C++ class to abstract OpenGL frame buffer objects.
virtual EQ_API ~SystemWindow()
Destroy the SystemWindow.
virtual EQ_API void swapBuffers()=0
Swap the front and back buffer.
A set of settings to setup an eq::SystemWindow.
EQ_API void setName(const std::string &name)
Set the window&#39;s name.
EQ_API void setPixelViewport(const PixelViewport &pvp)
Set the window&#39;s pixel viewport wrt its parent pipe.
virtual EQ_API void joinNVSwapBarrier(const uint32_t group, const uint32_t barrier)=0
Join a NV_swap_group.
virtual EQ_API void bindDrawFrameBuffer() const =0
Bind the window&#39;s draw FBO, used for multisampling.
virtual const util::FrameBufferObject * getFrameBufferObject() const
Definition: systemWindow.h:119
virtual EQ_API void finish()=0
Finish execution of all commands.
EQ_API SystemWindow(NotifierInterface &parent, const WindowSettings &settings)
Create a new SystemWindow for the given eq::Window.
A base class for notifying errors and events.
EQ_API const PixelViewport & getPixelViewport() const
virtual EQ_API bool configInit()=0
Initialize this system window.
virtual EQ_API void configExit()=0
De-initialize this system window.
EQ_API bool processEvent(EventType type)
Process a stateless event.
virtual EQ_API void makeCurrent(const bool cache=true) const =0
Make the system window rendering context and drawable current.
The Equalizer client library.
Definition: eq/agl/types.h:23
virtual EQ_API void queryDrawableConfig(DrawableConfig &dc)=0
Set up the given drawable based on the current context.
The interface definition for system-specific windowing code.
Definition: systemWindow.h:35
virtual const GLEWContext * glewGetContext() const
Get the GLEW context for this window.
Definition: systemWindow.h:145
virtual EQ_API void bindFrameBuffer() const =0
Bind the window&#39;s FBO, if it uses an FBO drawable.
virtual EQ_API void doneCurrent() const =0
This results in no context being current in the current thread.
virtual EQ_API void flush()=0
Flush all command buffers.