Changeset 3621 in orxonox.OLD for orxonox/trunk/src/lib/graphics
- Timestamp:
- Mar 21, 2005, 6:10:40 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/graphics_engine.cc
r3619 r3621 33 33 34 34 this->listModes(); 35 36 37 35 } 38 36 37 /** 38 \brief The Pointer to this GraphicsEngine 39 */ 39 40 GraphicsEngine* GraphicsEngine::singletonRef = NULL; 40 41 42 /** 43 \returns A pointer to this GraphicsEngine 44 */ 41 45 GraphicsEngine* GraphicsEngine::getInstance() 42 46 { … … 97 101 98 102 // 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); 100 104 105 // Enable default GL stuff 106 glEnable(GL_DEPTH_TEST); 101 107 } 102 108 103 109 /** 110 \brief Sets the GL-attributes 111 */ 104 112 int GraphicsEngine::setGLattribs(void) 105 113 { … … 121 129 } 122 130 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 */ 123 137 int GraphicsEngine::setResolution(int width, int height, int bpp) 124 138 { … … 128 142 129 143 printf ("ok\n"); 130 if((this->screen = SDL_SetVideoMode 144 if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags)) == NULL) 131 145 { 132 146 PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError()); … … 137 151 } 138 152 153 /** 154 \brief Signalhandler, for when the resolution has changed 155 \param resizeInfo SDL information about the size of the new screen size 156 */ 139 157 int GraphicsEngine::resolutionChanged(SDL_ResizeEvent* resizeInfo) 140 158 {
Note: See TracChangeset
for help on using the changeset viewer.