Equalizer  1.9.0
Parallel Rendering Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
x11/window.h
1 
2 /* Copyright (c) 2009-2015, Stefan.Eilemann@epfl.ch
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #ifndef EQ_X11_WINDOW_H
19 #define EQ_X11_WINDOW_H
20 
21 #include <eq/systemWindow.h> // base class
22 #include <eq/glx/types.h>
23 
24 namespace eq
25 {
30 namespace x11
31 {
32 
39 class Window : public SystemWindow, public boost::noncopyable
40 {
41 public:
42  Window( NotifierInterface& parent, const WindowSettings& settings,
43  Display* xDisplay );
44 
45  bool configInit() override;
46  void configExit() override;
47  void makeCurrent( bool /*cache*/ ) const override {}
48  void bindFrameBuffer() const override {}
49  void bindDrawFrameBuffer() const override {}
50  void updateFrameBuffer() const override {}
51  void swapBuffers() override {}
52  void joinNVSwapBarrier( const uint32_t, const uint32_t ) override {}
53  void queryDrawableConfig( eq::DrawableConfig& drawableConfig ) override;
54  void flush() override;
55  void finish() override { flush(); }
56 
58  virtual Display* getXDisplay();
59 
61  virtual XID getXDrawable() const { return _xDrawable; }
62 
73  virtual void setXDrawable( XID drawable ) { _xDrawable = drawable; }
74 
75 private:
76  XID _createWindow();
77  Display* _xDisplay;
78  XID _xDrawable;
79 };
80 
81 }
82 }
83 
84 #endif // EQ_X11_WINDOW_H
bool configInit() override
Initialize this system window.
A system window for CPU rendering on X11.
Definition: x11/window.h:39
void flush() override
Flush all command buffers.
virtual XID getXDrawable() const
Definition: x11/window.h:61
A set of settings to setup an eq::SystemWindow.
void makeCurrent(bool) const override
Make the system window rendering context and drawable current.
Definition: x11/window.h:47
virtual void setXDrawable(XID drawable)
Set the X11 drawable ID for this window.
Definition: x11/window.h:73
void joinNVSwapBarrier(const uint32_t, const uint32_t) override
Join a NV_swap_group.
Definition: x11/window.h:52
virtual Display * getXDisplay()
void updateFrameBuffer() const override
Update the window's FBO from the multisampled FBO.
Definition: x11/window.h:50
A base class for notifying errors and events.
void finish() override
Finish execution of all commands.
Definition: x11/window.h:55
The interface definition for system-specific windowing code.
Definition: systemWindow.h:35
void queryDrawableConfig(eq::DrawableConfig &drawableConfig) override
Set up the given drawable based on the current context.
void bindDrawFrameBuffer() const override
Bind the window's draw FBO, used for multisampling.
Definition: x11/window.h:49
void configExit() override
De-initialize this system window.
void swapBuffers() override
Swap the front and back buffer.
Definition: x11/window.h:51
void bindFrameBuffer() const override
Bind the window's FBO, if it uses an FBO drawable.
Definition: x11/window.h:48