LCOV - code coverage report
Current view: top level - eq - systemPipe.h (source / functions) Hit Total Coverage
Test: Equalizer Lines: 2 2 100.0 %
Date: 2017-12-16 05:07:20 Functions: 2 2 100.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2009-2015, Stefan Eilemann <eile@equalizergraphics.com>
       3             :  *                          Maxim Makhinya
       4             :  *                          Daniel Nachbaur <danielnachbaur@gmail.com>
       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_SYSTEM_PIPE_H
      21             : #define EQ_SYSTEM_PIPE_H
      22             : 
      23             : #include <eq/api.h>
      24             : #include <eq/error.h> // enum
      25             : #include <eq/types.h>
      26             : #include <string>
      27             : 
      28             : namespace eq
      29             : {
      30             : /**
      31             :  * The interface definition for system-specific GPU handling.
      32             :  *
      33             :  * The SystemPipe abstracts all OS-system specific code for handling a GPU,
      34             :  * which facilitates porting to new windowing systems. Each Pipe uses one
      35             :  * SystemPipe, which is initialized in Pipe::configInit. The SystemPipe has to
      36             :  * set the pipe's PixelViewport if it is invalid during configInit().
      37             :  */
      38             : class SystemPipe
      39             : {
      40             : public:
      41             :     /** Create a new SstemPipe for the given eq::Pipe. @version 1.0 */
      42             :     EQ_API explicit SystemPipe(Pipe* parent);
      43             : 
      44             :     /** Destroy the SystemPipe. @version 1.0 */
      45             :     EQ_API virtual ~SystemPipe();
      46             : 
      47             :     /** @name Methods forwarded from eq::Pipe. */
      48             :     //@{
      49             :     /** Initialize the GPU. @version 1.0 */
      50             :     EQ_API virtual bool configInit() = 0;
      51             : 
      52             :     /** De-initialize the GPU. @version 1.0 */
      53             :     EQ_API virtual void configExit() = 0;
      54             :     //@}
      55             : 
      56             :     /** @return the parent Pipe. @version 1.0 */
      57          12 :     Pipe* getPipe() { return _pipe; }
      58             :     /** @return the parent Pipe. @version 1.0 */
      59             :     const Pipe* getPipe() const { return _pipe; }
      60             :     /** @return the maximum available OpenGL version on this pipe.
      61             :      *  @version 1.9 */
      62           4 :     float getMaxOpenGLVersion() const { return _maxOpenGLVersion; }
      63             : protected:
      64             :     /** @name Error information. */
      65             :     //@{
      66             :     /**
      67             :      * Send a pipe error event to the application node.
      68             :      * @param error the error code.
      69             :      * @version 1.7.1
      70             :      */
      71             :     EQ_API EventOCommand sendError(const uint32_t error);
      72             :     //@}
      73             : 
      74             :     float _maxOpenGLVersion;
      75             : 
      76             : private:
      77             :     /** The parent eq::Pipe. */
      78             :     Pipe* const _pipe;
      79             : };
      80             : }
      81             : 
      82             : #endif // EQ_SYSTEM_PIPE_H

Generated by: LCOV version 1.11