Equalizer  2.1.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/glx/types.h>
22 #include <eq/systemWindow.h> // base class
23 
24 namespace eq
25 {
30 namespace x11
31 {
38 class Window : public SystemWindow
39 {
40 public:
41  Window(NotifierInterface& parent, const WindowSettings& settings,
42  Display* xDisplay);
43 
44  bool configInit() override;
45  void configExit() override;
46  void makeCurrent(bool /*cache*/) const override {}
47  void doneCurrent() 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(); }
57  virtual Display* getXDisplay();
58 
60  virtual XID getXDrawable() const { return _xDrawable; }
71  virtual void setXDrawable(XID drawable) { _xDrawable = drawable; }
72 private:
73  Window(const Window&) = delete;
74  Window& operator=(const Window&) = delete;
75  XID _createWindow();
76  Display* _xDisplay;
77  XID _xDrawable;
78 
79  void resize(const PixelViewport& pvp) override;
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:38
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:49
virtual XID getXDrawable() const
Definition: x11/window.h:60
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:71
void bindFrameBuffer() const override
Bind the window&#39;s FBO, if it uses an FBO drawable.
Definition: x11/window.h:48
void joinNVSwapBarrier(const uint32_t, const uint32_t) override
Join a NV_swap_group.
Definition: x11/window.h:52
void updateFrameBuffer() const override
Update the window&#39;s FBO from the multisampled FBO.
Definition: x11/window.h:50
void makeCurrent(bool) const override
Make the system window rendering context and drawable current.
Definition: x11/window.h:46
virtual Display * getXDisplay()
A base class for notifying errors and events.
void finish() override
Finish execution of all commands.
Definition: x11/window.h:55
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:47
void configExit() override
De-initialize this system window.
void swapBuffers() override
Swap the front and back buffer.
Definition: x11/window.h:51