Skip to content
Snippets Groups Projects
Select Git revision
  • 3d578b0e0221740434c19fdab3eadc7a81762f5f
  • master default
  • mingw_gcc44
  • release_ABP1_012
  • release_ABP1_008
  • release_ABP1_006
  • release_ABP1_007
  • release_ABP1_005
  • release_ABP1_004
  • release_ABP1_003
  • pre_release_0.15
  • release_ABP1_001
  • release_ABP1_002
  • pre_release_0.13
  • pre_release_0.14
  • pre_release_0.11
  • pre_release_0.12
  • pre_release_0.10
  • pre_release_0.09
  • pre_release_0.08
20 results

AbstractGraphicsEngine.h

Blame
  • Forked from einsteinathome / graphicsframework
    Source project has a limited visibility.
    AbstractGraphicsEngine.h 6.97 KiB
    /***************************************************************************
     *   Copyright (C) 2008 by Oliver Bock                                     *
     *   oliver.bock[AT]aei.mpg.de                                             *
     *                                                                         *
     *   This file is part of Einstein@Home.                                   *
     *                                                                         *
     *   Einstein@Home is free software: you can redistribute it and/or modify *
     *   it under the terms of the GNU General Public License as published     *
     *   by the Free Software Foundation, version 2 of the License.            *
     *                                                                         *
     *   Einstein@Home is distributed in the hope that it will be useful,      *
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the          *
     *   GNU General Public License for more details.                          *
     *                                                                         *
     *   You should have received a copy of the GNU General Public License     *
     *   along with Einstein@Home. If not, see <http://www.gnu.org/licenses/>. *
     *                                                                         *
     ***************************************************************************/
    
    #ifndef ABSTRACTGRAPHICSENGINE_H_
    #define ABSTRACTGRAPHICSENGINE_H_
    
    #include <string>
    
    #include "BOINCClientAdapter.h"
    #include "Resource.h"
    
    using namespace std;
    
    /**
     * \addtogroup framework Framework
     * @{
     */
    
    /**
     * \brief This abstract class provides common features for all graphics engines
     *
     * All graphics engines (Open GL visualisation code) have to be derived from this class.
     * First of all it defines the common interface which the rest of the graphics framework
     * expects any implementing classes to support. Apart from that, this class also defines
     * common properties like event idetifiers and basic access to BOINC client information.
     *
     * \author Oliver Bock\n
     * Max-Planck-Institute for Gravitational Physics\n
     * Hannover, Germany
     */
    class AbstractGraphicsEngine
    {
    public:
    	/// Destructor
    	virtual ~AbstractGraphicsEngine();
    
    	/**
    	 * \brief This method is called when an implementing graphics engine should initialize itself
    	 *
    	 * \param width The current width of the display surface
    	 * \param height The current height of the display surface
    	 * \param font A pointer to a Resource object containing TTF font faces for text rendering
    	 * \param recycle This flag indicates whether we initialize (FALSE) or reinitialize (TRUE) the context
    	 */
    	virtual void initialize(const int width, const int height, const Resource *font, const bool recycle = false) = 0;
    
    	/**
    	 * \brief This method is called when the windowing system encounters a window resize event
    	 *
    	 * \param width The new width of the display surface
    	 * \param height The new height of the display surface
    	 */
    	virtual void resize(const int width, const int height) = 0;