Equalizer  2.0.0
Parallel Rendering Framework
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
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 doneCurrent() const override {}
49  void bindFrameBuffer() const override {}
50  void bindDrawFrameBuffer() const override {}
51  void updateFrameBuffer() const override {}
52  void swapBuffers() override {}
53  void joinNVSwapBarrier( const uint32_t, const uint32_t ) override {}
54  void queryDrawableConfig( eq::DrawableConfig& drawableConfig ) override;
55  void flush() override;
56  void finish() override { flush(); }
57 
59  virtual Display* getXDisplay();
60 
62  virtual XID getXDrawable() const { return _xDrawable; }
63 
74  virtual void setXDrawable( XID drawable ) { _xDrawable = drawable; }
75 
76 private:
77  Window( const Window& ) = delete;
78  Window& operator=( const Window& ) = delete;
79  XID _createWindow();
80  Display* _xDisplay;
81  XID _xDrawable;
82 };
83 
84 }
85 }
86 
87 #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.
void bindDrawFrameBuffer() const override
Bind the window&#39;s draw FBO, used for multisampling.
Definition: x11/window.h:50
virtual XID getXDrawable() const
Definition: x11/window.h:62
A set of settings to setup an eq::SystemWindow.
virtual void setXDrawable(XID drawable)
Set the X11 drawable ID for this window.
Definition: x11/window.h:74
void bindFrameBuffer() const override
Bind the window&#39;s FBO, if it uses an FBO drawable.
Definition: x11/window.h:49
void joinNVSwapBarrier(const uint32_t, const uint32_t) override
Join a NV_swap_group.
Definition: x11/window.h:53
void updateFrameBuffer() const override
Update the window&#39;s FBO from the multisampled FBO.
Definition: x11/window.h:51
void makeCurrent(bool) const override
Make the system window rendering context and drawable current.
Definition: x11/window.h:47
virtual Display * getXDisplay()
A base class for notifying errors and events.
void finish() override
Finish execution of all commands.
Definition: x11/window.h:56
The Equalizer client library.
Definition: eq/agl/types.h:23
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 doneCurrent() const override
This results in no context being current in the current thread.
Definition: x11/window.h:48
void configExit() override
De-initialize this system window.
void swapBuffers() override
Swap the front and back buffer.
Definition: x11/window.h:52