Equalizer  1.6.1
glWindow.h
1 
2 /* Copyright (c) 2005-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  * 2009, Makhinya Maxim
4  *
5  * This library is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License version 2.1 as published
7  * by the Free Software Foundation.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef EQ_GL_WINDOW_H
20 #define EQ_GL_WINDOW_H
21 
22 #include <eq/client/systemWindow.h> // base class
23 
24 namespace eq
25 {
33  class GLWindow : public SystemWindow
34  {
35  public:
37  EQ_API GLWindow( Window* parent );
38 
40  EQ_API virtual ~GLWindow();
41 
43  EQ_API virtual void makeCurrent( const bool cache = true ) const;
44 
49  EQ_API bool isCurrent() const;
50 
54  EQ_API virtual void bindFrameBuffer() const;
55 
57  EQ_API virtual void flush();
58 
60  EQ_API virtual void finish();
61 
63  EQ_API virtual bool configInitFBO();
64 
66  EQ_API virtual void configExitFBO();
67 
70  const { return _fbo; }
72 
74  EQ_API virtual void initGLEW();
75 
77  virtual void exitGLEW() { _glewInitialized = false; }
78 
93  EQ_API virtual const GLEWContext* glewGetContext() const;
94 
99  EQ_API virtual void queryDrawableConfig( DrawableConfig& );
100 
101  private:
102  bool _glewInitialized ;
103 
105  GLEWContext* const _glewContext;
106 
109 
110  GLEWContext* glewGetContext();
111 
112  struct Private;
113  Private* _private; // placeholder for binary-compatible changes
114  };
115 }
116 
117 
118 #endif // EQ_GL_WINDOW_H
119 
virtual void finish()
Finish execution of all commands.
virtual void queryDrawableConfig(DrawableConfig &)
Set up the drawable config by querying the current context.
virtual void configExitFBO()
Destroy the FBO.
A C++ class to abstract OpenGL frame buffer objects.
virtual const util::FrameBufferObject * getFrameBufferObject() const
Definition: glWindow.h:69
A Window represents an on-screen or off-screen drawable.
A system window for OpenGL rendering.
Definition: glWindow.h:33
virtual void makeCurrent(const bool cache=true) const
Bind the FBO and update the current cache.
GLWindow(Window *parent)
Construct a new OpenGL window.
virtual ~GLWindow()
Destruct a new OpenGL window.
virtual void initGLEW()
Initialize the GLEW context for this window.
virtual void bindFrameBuffer() const
Bind the window&#39;s FBO, if it uses an FBO drawable.
virtual void exitGLEW()
De-initialize the GLEW context.
Definition: glWindow.h:77
bool isCurrent() const
The interface definition for system-specific windowing code.
Definition: systemWindow.h:35
virtual void flush()
Flush all command buffers.
virtual bool configInitFBO()
Build and initialize the FBO.
virtual const GLEWContext * glewGetContext() const
Get the GLEW context for this window.