Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6753 in orxonox.OLD for trunk/src/lib/graphics


Ignore:
Timestamp:
Jan 26, 2006, 1:08:23 AM (18 years ago)
Author:
patrick
Message:

trunk: merged network back to trunk

Location:
trunk/src/lib/graphics
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/Makefile.am

    r5463 r6753  
    1111                           text_engine/text_engine.cc \
    1212                           text_engine/text.cc \
    13                            text_engine/font.cc
     13                           text_engine/font.cc \
     14                           effects/graphics_effect.cc \
     15                           effects/fog_effect.cc
    1416
    1517noinst_HEADERS = graphics_engine.h \
     
    2022                 text_engine/text_engine.h \
    2123                 text_engine/text.h \
    22                  text_engine/font.h
     24                 text_engine/font.h \
     25                 effects/graphics_effect.h \
     26                 effects/fog_effect.h
    2327
    2428
  • trunk/src/lib/graphics/graphics_engine.cc

    r6634 r6753  
    3535#include "globals.h"
    3636#include "texture.h"
     37
     38#include "effects/graphics_effect.h"
    3739
    3840#include "shell_command.h"
     
    653655      break;
    654656  }
    655 
    656 }
     657}
     658
     659
     660/**
     661 * loads a GraphicsEffect into the engine
     662 * @param effect the GraphicsEffect to add
     663 */
     664bool GraphicsEngine::loadGraphicsEffect(GraphicsEffect* effect)
     665{
     666  list<GraphicsEffect*>::iterator it;
     667  for (it = this->graphicsEffects.begin(); it != this->graphicsEffects.end(); it++)
     668    if( (*it) == effect)
     669      return false;
     670
     671  this->graphicsEffects.push_back(effect);
     672
     673  return true;
     674}
     675
     676
     677/**
     678 * unloads a GraphicsEffect from the engine
     679 * @param effect the GraphicsEffect to remove
     680 */
     681bool GraphicsEngine::unloadGraphicsEffect(GraphicsEffect* effect)
     682{
     683  list<GraphicsEffect*>::iterator it;
     684  for (it = this->graphicsEffects.begin(); it != this->graphicsEffects.end(); it++)
     685  {
     686    if( (*it) == effect)
     687    {
     688      this->graphicsEffects.erase(it);
     689      return true;
     690    }
     691  }
     692
     693  return false;
     694}
     695
  • trunk/src/lib/graphics/graphics_engine.h

    r6522 r6753  
    2222class SubString;
    2323class WorldEntity;
     24class GraphicsEffect;
    2425
    2526//! class to handle graphics
     
    8283    void process(const Event  &event);
    8384
     85    bool loadGraphicsEffect(GraphicsEffect* effect);
     86    bool unloadGraphicsEffect(GraphicsEffect* effect);
     87
     88
     89
    8490  private:
    8591    GraphicsEngine();
     
    9197
    9298  private:
    93     static GraphicsEngine*  singletonRef;       //!< Pointer to the only instance of this Class
    94     bool                    isInit;             //!< if the GraphicsEngine is initialized.
     99    static GraphicsEngine*     singletonRef;       //!< Pointer to the only instance of this Class
     100    bool                       isInit;             //!< if the GraphicsEngine is initialized.
    95101
    96102    // state.
    97     SDL_Surface*            screen;             //!< the screen we draw to
    98     int                     resolutionX;        //!< the X-resoultion of the screen
    99     int                     resolutionY;        //!< the Y-resolution of the screen
    100     int                     bitsPerPixel;       //!< the bits per pixels of the screen
    101     Uint32                  fullscreenFlag;     //!< if we are in fullscreen mode
    102     Uint32                  videoFlags;         //!< flags for video
    103     SDL_Rect**              videoModes;         //!< list of resolutions
     103    SDL_Surface*               screen;             //!< the screen we draw to
     104    int                        resolutionX;        //!< the X-resoultion of the screen
     105    int                        resolutionY;        //!< the Y-resolution of the screen
     106    int                        bitsPerPixel;       //!< the bits per pixels of the screen
     107    Uint32                     fullscreenFlag;     //!< if we are in fullscreen mode
     108    Uint32                     videoFlags;         //!< flags for video
     109    SDL_Rect**                 videoModes;         //!< list of resolutions
    104110
    105     bool                    fogEnabled;         //!< If Fog should be enabled.
    106     bool                    shadowsEnabled;     //!< If Shadows should be enabled.
    107     bool                    particlesEnabled;   //!< If particles should be enabled.
    108     int                     particlesValue;     //!< How many particles
    109     int                     textureQuality;     //!< the quality of Textures
    110     int                     filteringMethod;    //!< The filtering Method of textures.
    111     int                     modelQuality;       //!< The quality of the Models loaded.
    112     int                     antialiasingDepth;  //!< the Depth of the AntiAlias-Filter.
     111    bool                       fogEnabled;         //!< If Fog should be enabled.
     112    bool                       shadowsEnabled;     //!< If Shadows should be enabled.
     113    bool                       particlesEnabled;   //!< If particles should be enabled.
     114    int                        particlesValue;     //!< How many particles
     115    int                        textureQuality;     //!< the quality of Textures
     116    int                        filteringMethod;    //!< The filtering Method of textures.
     117    int                        modelQuality;       //!< The quality of the Models loaded.
     118    int                        antialiasingDepth;  //!< the Depth of the AntiAlias-Filter.
    113119
    114120    // HARDWARE-Settings:
    115     char*                   hwRenderer;         //!< HW-renderer-string
    116     char*                   hwVendor;           //!< HW-vendor-string
    117     char*                   hwVersion;          //!< HW-version-string
    118     SubString*              hwExtensions;       //!< All suported Extensions.
     121    char*                      hwRenderer;         //!< HW-renderer-string
     122    char*                      hwVendor;           //!< HW-vendor-string
     123    char*                      hwVersion;          //!< HW-version-string
     124    SubString*                 hwExtensions;       //!< All suported Extensions.
    119125
    120126    // FPS-related
    121     bool                    bDisplayFPS;        //!< is true if the fps should be displayed
    122     float                   currentFPS;         //!< the current frame rate: frames per seconds
    123     float                   maxFPS;             //!< maximal frame rate we ever got since start of the game
    124     float                   minFPS;             //!< minimal frame rate we ever got since start.
     127    bool                       bDisplayFPS;        //!< is true if the fps should be displayed
     128    float                      currentFPS;         //!< the current frame rate: frames per seconds
     129    float                      maxFPS;             //!< maximal frame rate we ever got since start of the game
     130    float                      minFPS;             //!< minimal frame rate we ever got since start.
     131
     132    std::list<GraphicsEffect*> graphicsEffects;    //!< list of graphics effects
     133
    125134
    126135#ifndef NO_TEXT
Note: See TracChangeset for help on using the changeset viewer.