Equalizer  2.1.0
Parallel Rendering Framework
glWindow.h
1 
2 /* Copyright (c) 2005-2016, Stefan Eilemann <eile@equalizergraphics.com>
3  * Daniel Nachbaur <danielnachbaur@gmail.com>
4  * Makhinya Maxim
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_GL_WINDOW_H
21 #define EQ_GL_WINDOW_H
22 
23 #include <eq/systemWindow.h> // base class
24 
25 namespace eq
26 {
27 namespace detail
28 {
29 class GLWindow;
30 }
31 
39 class GLWindow : public SystemWindow
40 {
41 public:
43  EQ_API GLWindow(NotifierInterface& parent, const WindowSettings& settings);
44 
46  EQ_API virtual ~GLWindow();
47 
49  EQ_API void resize(const PixelViewport& pvp) override;
50 
52  EQ_API void makeCurrent(const bool cache = true) const override;
53 
55  EQ_API void doneCurrent() const override;
56 
61  EQ_API bool isCurrent() const;
62 
66  EQ_API void bindFrameBuffer() const override;
67 
69  EQ_API void bindDrawFrameBuffer() const override;
70 
72  EQ_API void updateFrameBuffer() const override;
73 
75  EQ_API void flush() override;
76 
78  EQ_API void finish() override;
79 
81  EQ_API virtual bool configInitFBO();
82 
84  EQ_API virtual void configExitFBO();
85 
87  EQ_API const util::FrameBufferObject* getFrameBufferObject() const override;
88 
90  EQ_API util::FrameBufferObject* getFrameBufferObject() override;
92 
94  EQ_API virtual void initGLEW();
95 
97  EQ_API virtual void exitGLEW();
98 
112  EQ_API const GLEWContext* glewGetContext() const override;
113 
118  EQ_API void queryDrawableConfig(DrawableConfig&) override;
119 
120 private:
121  GLWindow(const GLWindow&) = delete;
122  GLWindow& operator=(const GLWindow&) = delete;
123  bool _createFBO(util::FrameBufferObject*& fbo, const int samplesSize);
124  void _destroyFBO(util::FrameBufferObject*& fbo);
125 
126  detail::GLWindow* const _impl;
127 
128  GLEWContext* glewGetContext();
129 
136  virtual void _resize(const PixelViewport& pvp) = 0;
137 };
138 }
139 
140 #endif // EQ_GL_WINDOW_H
A C++ class to abstract OpenGL frame buffer objects.
A set of settings to setup an eq::SystemWindow.
A system window for OpenGL rendering.
Definition: glWindow.h:39
A base class for notifying errors and events.
The Equalizer client library.
Definition: eq/agl/types.h:23
The interface definition for system-specific windowing code.
Definition: systemWindow.h:35