Equalizer  2.0.0
Parallel Rendering Framework
glWindow.h
1 
2 /* Copyright (c) 2005-2015, 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 { class GLWindow; }
28 
36 class GLWindow : public SystemWindow
37 {
38 public:
40  EQ_API GLWindow( NotifierInterface& parent,
41  const WindowSettings& settings );
42 
44  EQ_API virtual ~GLWindow();
45 
47  EQ_API void makeCurrent( const bool cache = true ) const override;
48 
50  EQ_API void doneCurrent() const override;
51 
56  EQ_API bool isCurrent() const;
57 
61  EQ_API void bindFrameBuffer() const override;
62 
64  EQ_API void bindDrawFrameBuffer() const override;
65 
67  EQ_API void updateFrameBuffer() const override;
68 
70  EQ_API void flush() override;
71 
73  EQ_API void finish() override;
74 
76  EQ_API virtual bool configInitFBO();
77 
79  EQ_API virtual void configExitFBO();
80 
82  EQ_API const util::FrameBufferObject* getFrameBufferObject() const override;
83 
85  EQ_API util::FrameBufferObject* getFrameBufferObject() override;
87 
89  EQ_API virtual void initGLEW();
90 
92  EQ_API virtual void exitGLEW();
93 
107  EQ_API const GLEWContext* glewGetContext() const override;
108 
113  EQ_API void queryDrawableConfig( DrawableConfig& ) override;
114 
115 private:
116  GLWindow( const GLWindow& ) = delete;
117  GLWindow& operator=( const GLWindow& ) = delete;
118  bool _createFBO( util::FrameBufferObject*& fbo, const int samplesSize );
119  void _destroyFBO( util::FrameBufferObject*& fbo );
120 
121  detail::GLWindow* const _impl;
122 
123  GLEWContext* glewGetContext();
124 };
125 }
126 
127 
128 #endif // EQ_GL_WINDOW_H
129 
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:36
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