Skip to content
Snippets Groups Projects
Select Git revision
  • 46933626f6585f30d4ba0af6923b9a1099b81c05
  • 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

GraphicsEngineFactory.h

Blame
  • Forked from einsteinathome / graphicsframework
    Source project has a limited visibility.
    starsphere.h 2.15 KiB
    /*****************************************************************************
     * Star Sphere graphics for Einstein@Home Screen Saver  
     * 
     * @(#) $Id$
     *
     * Copyright (C) 2004 David Hammer, Eric Myers, Bruce Allen
     * Copyright (C) 2008 Bernd Machenschalk
     * Copyright (C) 2008 Oliver Bock
     *
     * This program 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; either version 2, or (at your option)
     * any later version.
     *
     * You should have received a copy of the GNU General Public License
     * (for example COPYING); if not, write to the Free
     * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     ************************************************************************/
    
    #ifndef BOINC_APP_GRAPHICS
    #define BOINC_APP_GRAPHICS
    
    // or for Unix 
    #include <cmath>
    #include <cstdio>
    #include <cstring>
    
    #include <SDL_opengl.h>
    
    #include <FTGLExtrdFont.h>
    #include <FTGLOutlineFont.h>
    #include <FTGLPolygonFont.h>
    #include <FTGLTextureFont.h>
    #include <FTGLPixmapFont.h>
    #include <FTGLBitmapFont.h>
    
    #define EAH_SHMEM_APP_NAME "Einstein@Home"
    
    /* SIN and COS take arguments in DEGREES */
    #define PI 3.14159265
    #define PI2 (2*PI)
    #define COS(X)   cos( (X) * PI2/360.0 )
    #define SIN(X)   sin( (X) * PI2/360.0 )
    
    /* search marker status */
    #define MARKER_NONE 0
    #define MARKER_SHOW 1
    #define MARKER_NEW  2
    
    // place to keep current window dimensions
    extern float gfx_width, gfx_height;
    
    // If graphics are disabled during compilation then we still need
    // empty callbacks for these:
    void app_graphics_init();
    void app_graphics_resize(int w, int h);
    void app_graphics_render(int xs, int ys, double time_of_day);
    
    void rotateSphere(const int relativeRotation, const int relativeElevation);
    void zoomSphere(const int relativeZoom);
    
    // features
    typedef enum Features {
    	STARS=1,
    	CONSTELLATIONS=2,
    	OBSERVATORIES=4,
    	XRAYS=8,
    	PULSARS=16,
    	SNRS=32,
    	GLOBE=64,
    	AXES=128,
    	SEARCHINFO=256,
    	LOGO=512
    } FEATURES;
    
    // feature control API
    void setFeature(const FEATURES features, const bool enable);
    bool isFeature(const FEATURES features);
    
    // font from main.C
    extern FTFont *font;
    
    #endif