Equalizer  1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
glWindow.h
1 
2 /* Copyright (c) 2005-2014, Stefan Eilemann <eile@equalizergraphics.com>
3  * 2014, Daniel Nachbaur <danielnachbaur@gmail.com>
4  * 2009, 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/client/systemWindow.h> // base class
24 
25 namespace eq
26 {
27 namespace detail { class GLWindow; }
28 
36 class GLWindow : public SystemWindow, public boost::noncopyable
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 
53  EQ_API bool isCurrent() const;
54 
58  EQ_API void bindFrameBuffer() const override;
59 
61  EQ_API void flush() override;
62 
64  EQ_API void finish() override;
65 
67  EQ_API virtual bool configInitFBO();
68 
70  EQ_API virtual void configExitFBO();
71 
73  EQ_API const util::FrameBufferObject* getFrameBufferObject() const override;
75 
77  EQ_API virtual void initGLEW();
78 
80  EQ_API virtual void exitGLEW();
81 
95  EQ_API const GLEWContext* glewGetContext() const override;
96 
101  EQ_API void queryDrawableConfig( DrawableConfig& ) override;
102 
103 private:
104  detail::GLWindow* const _impl;
105 
106  GLEWContext* glewGetContext();
107 };
108 }
109 
110 
111 #endif // EQ_GL_WINDOW_H
112 
virtual EQ_API void exitGLEW()
De-initialize the GLEW context.
virtual EQ_API void configExitFBO()
Destroy the FBO.
A C++ class to abstract OpenGL frame buffer objects.
EQ_API void makeCurrent(const bool cache=true) const override
Bind the FBO and update the current cache.
EQ_API void bindFrameBuffer() const override
Bind the window's FBO, if it uses an FBO drawable.
virtual EQ_API ~GLWindow()
Destruct a new OpenGL window.
A set of settings to setup an eq::SystemWindow.
EQ_API bool isCurrent() const
EQ_API void flush() override
Flush all command buffers.
EQ_API GLWindow(NotifierInterface &parent, const WindowSettings &settings)
Construct a new OpenGL window.
EQ_API void finish() override
Finish execution of all commands.
A system window for OpenGL rendering.
Definition: glWindow.h:36
EQ_API const util::FrameBufferObject * getFrameBufferObject() const override
A base class for notifying errors and events.
The interface definition for system-specific windowing code.
Definition: systemWindow.h:35
EQ_API const GLEWContext * glewGetContext() const override
Get the GLEW context for this window.
EQ_API void queryDrawableConfig(DrawableConfig &) override
Set up the drawable config by querying the current context.
virtual EQ_API void initGLEW()
Initialize the GLEW context for this window.
virtual EQ_API bool configInitFBO()
Build and initialize the FBO.