Equalizer  1.6.1
include/eq/client/glx/pipe.h
1 
2 /* Copyright (c) 2009-2012, Stefan Eilemann <eile@equalizergraphics.com>
3  2009, Maxim Makhinya
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_GLX_PIPE_H
20 #define EQ_GLX_PIPE_H
21 
22 #include <eq/client/glx/types.h>
23 
24 #include <eq/client/gl.h> // GLXEWContext
25 #include <eq/client/systemPipe.h> // base class
26 
27 namespace eq
28 {
29 namespace glx
30 {
32  class Pipe : public SystemPipe
33  {
34  public:
36  Pipe( eq::Pipe* parent );
37 
39  virtual ~Pipe();
40 
49  EQ_API virtual bool configInit();
50 
57  EQ_API virtual void configExit();
59 
61  Display* getXDisplay() const { return _xDisplay; }
62 
64  GLXEWContext* glxewGetContext() { return _glxewContext; }
65 
67  static bool getGPUInfo( Display* display, GPUInfo& info );
68 
69  protected:
79  void setXDisplay( Display* display );
80 
86  std::string getXDisplayString();
87 
96  virtual bool configInitGL() { return true; }
97 
98  private:
100  Display* _xDisplay;
101 
103  GLXEWContext* const _glxewContext;
104  bool _configInitGLXEW();
105 
106  struct Private;
107  Private* _private; // placeholder for binary-compatible changes
108  };
109 }
110 }
111 #endif // EQ_GLX_PIPE_H
virtual bool configInit()
Initialize this pipe for the GLX window system.
Default implementation of a glX system pipe.
std::string getXDisplayString()
Pipe(eq::Pipe *parent)
Construct a new glX system pipe.
virtual ~Pipe()
Destruct this glX pipe.
A Pipe represents a graphics card (GPU) on a Node.
virtual void configExit()
Deinitialize this pipe for the GLX window system.
GLXEWContext * glxewGetContext()
The interface definition for system-specific GPU handling.
Definition: systemPipe.h:37
void setXDisplay(Display *display)
Set the X display connection for this pipe.
Display * getXDisplay() const
virtual bool configInitGL()
Initialize this pipe for OpenGL.
Includes OpenGL and GLEW headers.