Equalizer  1.13.0
Parallel Rendering Framework
systemWindow.h
1 
2 /* Copyright (c) 2005-2015, 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 virtual bool processEvent( const Event& event );
157 
164  EQ_API void setPixelViewport( const PixelViewport& pvp );
165 
170  EQ_API const PixelViewport& getPixelViewport() const;
171 
177  EQ_API uint32_t getColorFormat() const;
178 
180  EQ_API void setName( const std::string& name );
181 
183  EQ_API const std::string& getName() const;
184 
186  EQ_API int32_t getIAttribute( const WindowSettings::IAttribute attr ) const;
187 
192  EQ_API const SystemWindow* getSharedContextWindow() const;
193 
194 private:
195  NotifierInterface& _parent;
196  WindowSettings _settings;
197 };
198 }
199 
200 
201 #endif // EQ_SYSTEM_WINDOW_H
virtual util::FrameBufferObject * getFrameBufferObject()
Definition: systemWindow.h:122
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 updateFrameBuffer() const =0
Update the window's FBO from the multisampled FBO.
virtual EQ_API bool processEvent(const Event &event)
Process an event.
virtual EQ_API void swapBuffers()=0
Swap the front and back buffer.
A set of settings to setup an eq::SystemWindow.
virtual EQ_API void doneCurrent() const =0
This results in no context being current in the current thread.
EQ_API void setName(const std::string &name)
Set the window's name.
EQ_API void setPixelViewport(const PixelViewport &pvp)
Set the window'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 const util::FrameBufferObject * getFrameBufferObject() const
Definition: systemWindow.h:119
virtual EQ_API void bindFrameBuffer() const =0
Bind the window's FBO, if it uses an FBO drawable.
virtual EQ_API void bindDrawFrameBuffer() const =0
Bind the window's draw FBO, used for multisampling.
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.
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 makeCurrent(const bool cache=true) const =0
Make the system window rendering context and drawable current.
virtual EQ_API void flush()=0
Flush all command buffers.