Equalizer  1.8.0
Parallel Rendering Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
systemWindow.h
1 
2 /* Copyright (c) 2005-2014, Stefan Eilemann <eile@equalizergraphics.com>
3  * 2014, Daniel Nachbaur <danielnachbaur@gmail.com>
4  * 2009, 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/client/types.h>
24 #include <eq/client/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 
75  EQ_API virtual void makeCurrent( const bool cache = true ) const = 0;
76 
78  EQ_API virtual void bindFrameBuffer() const = 0;
79 
81  EQ_API virtual void swapBuffers() = 0;
82 
84  EQ_API virtual void flush() = 0;
85 
87  EQ_API virtual void finish() = 0;
88 
99  EQ_API virtual void joinNVSwapBarrier( const uint32_t group,
100  const uint32_t barrier ) = 0;
102 
107  const { return 0; }
109 
114  EQ_API virtual void queryDrawableConfig( DrawableConfig& dc ) = 0;
115 
130  virtual const GLEWContext* glewGetContext() const { return 0; }
131 
138  EQ_API EventOCommand sendError( const uint32_t error );
139 
141  EQ_API virtual bool processEvent( const Event& event );
142 
149  EQ_API void setPixelViewport( const PixelViewport& pvp );
150 
155  EQ_API const PixelViewport& getPixelViewport() const;
156 
162  EQ_API uint32_t getColorFormat() const;
163 
165  EQ_API void setName( const std::string& name );
166 
168  EQ_API const std::string& getName() const;
169 
171  EQ_API int32_t getIAttribute( const WindowSettings::IAttribute attr ) const;
172 
177  EQ_API const SystemWindow* getSharedContextWindow() const;
178 
179 private:
180  NotifierInterface& _parent;
181  WindowSettings _settings;
182 };
183 }
184 
185 
186 #endif // EQ_SYSTEM_WINDOW_H
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 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.
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:106
virtual EQ_API void bindFrameBuffer() const =0
Bind the window's FBO, if it uses an FBO drawable.
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.
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:130
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.