Equalizer  1.9.0
Parallel Rendering Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
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 bindDrawFrameBuffer() const = 0;
82 
84  EQ_API virtual void updateFrameBuffer() const = 0;
85 
87  EQ_API virtual void swapBuffers() = 0;
88 
90  EQ_API virtual void flush() = 0;
91 
93  EQ_API virtual void finish() = 0;
94 
105  EQ_API virtual void joinNVSwapBarrier( const uint32_t group,
106  const uint32_t barrier ) = 0;
108 
113  const { return 0; }
117 
122  EQ_API virtual void queryDrawableConfig( DrawableConfig& dc ) = 0;
123 
138  virtual const GLEWContext* glewGetContext() const { return 0; }
139 
146  EQ_API EventOCommand sendError( const uint32_t error );
147 
149  EQ_API virtual bool processEvent( const Event& event );
150 
157  EQ_API void setPixelViewport( const PixelViewport& pvp );
158 
163  EQ_API const PixelViewport& getPixelViewport() const;
164 
170  EQ_API uint32_t getColorFormat() const;
171 
173  EQ_API void setName( const std::string& name );
174 
176  EQ_API const std::string& getName() const;
177 
179  EQ_API int32_t getIAttribute( const WindowSettings::IAttribute attr ) const;
180 
185  EQ_API const SystemWindow* getSharedContextWindow() const;
186 
187 private:
188  NotifierInterface& _parent;
189  WindowSettings _settings;
190 };
191 }
192 
193 
194 #endif // EQ_SYSTEM_WINDOW_H
virtual util::FrameBufferObject * getFrameBufferObject()
Definition: systemWindow.h:115
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.
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:112
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.
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:138
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.