Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Mar 21, 2005, 6:10:40 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: doxygen-tags and some minor stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/graphics_engine.cc

    r3619 r3621  
    3333
    3434  this->listModes();
    35 
    36 
    3735}
    3836
     37/**
     38   \brief The Pointer to this GraphicsEngine
     39*/
    3940GraphicsEngine* GraphicsEngine::singletonRef = NULL;
    4041
     42/**
     43   \returns A pointer to this GraphicsEngine
     44*/
    4145GraphicsEngine* GraphicsEngine::getInstance()
    4246{
     
    97101 
    98102  // TO DO: Create a cool icon and use it here
    99   // SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask); 
     103  SDL_WM_SetIcon(SDL_LoadBMP("../data/pictures/orxonox-icon32x32.bmp"), NULL); 
    100104
     105  // Enable default GL stuff
     106  glEnable(GL_DEPTH_TEST);
    101107}
    102108
    103 
     109/**
     110   \brief Sets the GL-attributes
     111*/
    104112int GraphicsEngine::setGLattribs(void)
    105113{
     
    121129}
    122130
     131/**
     132   \brief sets the Resolution of the Screen to display the Graphics to.
     133   \param width The width of the window
     134   \param height The height of the window
     135   \param bpp bits per pixel
     136*/
    123137int GraphicsEngine::setResolution(int width, int height, int bpp)
    124138{
     
    128142 
    129143  printf ("ok\n");
    130   if((this->screen = SDL_SetVideoMode (this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags)) == NULL)
     144  if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags)) == NULL)
    131145    {
    132146      PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());
     
    137151}
    138152
     153/**
     154   \brief Signalhandler, for when the resolution has changed
     155   \param resizeInfo SDL information about the size of the new screen size
     156*/
    139157int GraphicsEngine::resolutionChanged(SDL_ResizeEvent* resizeInfo)
    140158{
Note: See TracChangeset for help on using the changeset viewer.