Equalizer  1.6.1
systemWindow.h
1 
2 /* Copyright (c) 2005-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  * 2009, Maxim Makhinya
4  *
5  * This library is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License version 2.1 as published
7  * by the Free Software Foundation.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef EQ_SYSTEM_WINDOW_H
20 #define EQ_SYSTEM_WINDOW_H
21 
22 #include <eq/client/types.h>
23 #include <eq/client/window.h> // Window::IAttribute enum
24 
25 namespace eq
26 {
36  {
37  public:
39  EQ_API SystemWindow( Window* parent );
40 
42  EQ_API virtual ~SystemWindow();
43 
56  EQ_API virtual bool configInit() = 0;
57 
66  EQ_API virtual void configExit() = 0;
67 
76  EQ_API virtual void makeCurrent( const bool cache = true ) const = 0;
77 
79  EQ_API virtual void bindFrameBuffer() const = 0;
80 
82  EQ_API virtual void swapBuffers() = 0;
83 
85  EQ_API virtual void flush() = 0;
86 
88  EQ_API virtual void finish() = 0;
89 
100  EQ_API virtual void joinNVSwapBarrier( const uint32_t group,
101  const uint32_t barrier ) = 0;
103 
107  EQ_API bool configInitFBO();
108 
110  EQ_API void configExitFBO();
111 
114  const { return 0; }
116 
120  Window* getWindow() { return _window; }
121 
123  const Window* getWindow() const { return _window; }
124 
126  EQ_API Pipe* getPipe();
127 
129  EQ_API const Pipe* getPipe() const;
130 
132  EQ_API Node* getNode();
133 
135  EQ_API const Node* getNode() const;
136 
138  EQ_API Config* getConfig();
139 
141  EQ_API const Config* getConfig() const;
142 
144  EQ_API int32_t getIAttribute( const Window::IAttribute attr ) const;
146 
151  EQ_API virtual void queryDrawableConfig( DrawableConfig& dc ) = 0;
152 
167  virtual const GLEWContext* glewGetContext() const { return 0; }
168 
177  EQ_API void setError( const int32_t error );
178 
180  EQ_API eq::fabric::Error getError() const;
181 
183  EQ_API virtual bool processEvent( const Event& event );
184 
185  private:
187  Window* const _window;
188 
189  struct Private;
190  Private* _private; // placeholder for binary-compatible changes
191  };
192 }
193 
194 
195 #endif // EQ_SYSTEM_WINDOW_H
196 
A configuration is a visualization session driven by an application.
int32_t getIAttribute(const Window::IAttribute attr) const
Event structure to report window system and other events.
Definition: event.h:171
virtual void flush()=0
Flush all command buffers.
virtual void bindFrameBuffer() const =0
Bind the window&#39;s FBO, if it uses an FBO drawable.
virtual void joinNVSwapBarrier(const uint32_t group, const uint32_t barrier)=0
Join a NV_swap_group.
A C++ class to abstract OpenGL frame buffer objects.
bool configInitFBO()
Build and initialize the FBO.
virtual void makeCurrent(const bool cache=true) const =0
Make the system window rendering context and drawable current.
virtual void queryDrawableConfig(DrawableConfig &dc)=0
Set up the given drawable based on the current context.
virtual bool processEvent(const Event &event)
Process an event.
A Window represents an on-screen or off-screen drawable.
virtual const GLEWContext * glewGetContext() const
Get the GLEW context for this window.
Definition: systemWindow.h:167
Error
Defines errors produced by Equalizer classes.
SystemWindow(Window *parent)
Create a new SystemWindow for the given eq::Window.
A Node represents a single computer in the cluster.
const Window * getWindow() const
Definition: systemWindow.h:123
A Pipe represents a graphics card (GPU) on a Node.
void configExitFBO()
Destroy FBO.
Config * getConfig()
virtual void swapBuffers()=0
Swap the front and back buffer.
eq::fabric::Error getError() const
The interface definition for system-specific windowing code.
Definition: systemWindow.h:35
Window * getWindow()
Definition: systemWindow.h:120
virtual const util::FrameBufferObject * getFrameBufferObject() const
Definition: systemWindow.h:113
virtual bool configInit()=0
Initialize this system window.
virtual void finish()=0
Finish execution of all commands.
virtual void configExit()=0
De-initialize this system window.
void setError(const int32_t error)
Set an error code why the last operation failed.
virtual ~SystemWindow()
Destroy the SystemWindow.