Changeset 3336 in orxonox.OLD for orxonox/branches/parenting/src/orxonox.cc
- Timestamp:
- Jan 5, 2005, 2:05:31 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/parenting/src/orxonox.cc
r3226 r3336 123 123 int width = 640; 124 124 int height = 480; 125 Uint32 flags = SDL_HWSURFACE | SDL_OPENGL | SDL_GL_DOUBLEBUFFER; 126 127 if((screen = SDL_SetVideoMode (width, height, bpp, flags)) == NULL) 125 //Uint32 flags = SDL_HWSURFACE | SDL_OPENGL | SDL_GL_DOUBLEBUFFER; /* \todo: SDL_OPENGL doen't permit to load images*/ 126 //Uint32 flags = SDL_HWSURFACE | SDL_GL_DOUBLEBUFFER; 127 128 Uint32 videoFlags = SDL_OPENGL | SDL_HWPALETTE | SDL_RESIZABLE; 129 130 /* query SDL for information about our video hardware */ 131 const SDL_VideoInfo* videoInfo = SDL_GetVideoInfo (); 132 133 if( videoInfo == NULL) 134 { 135 printf ("Orxonox::initVideo() - Failed getting Video Info :%s\n", SDL_GetError()); 136 SDL_Quit (); 137 } 138 if( videoInfo->hw_available) 139 videoFlags |= SDL_HWSURFACE; 140 else 141 videoFlags |= SDL_SWSURFACE; 142 /* 143 if(VideoInfo -> blit_hw) 144 VideoFlags |= SDL_HWACCEL; 145 */ 146 147 if((this->screen = SDL_SetVideoMode (width, height, bpp, videoFlags)) == NULL) 128 148 { 129 printf("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", width, height, bpp, flags, SDL_GetError());149 printf("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", width, height, bpp, videoFlags, SDL_GetError()); 130 150 SDL_Quit(); 131 151 return -1; … … 139 159 140 160 // OpenGL stuff 141 // (Is this all we initialize globally???)142 161 glClearColor(0.0, 0.0, 0.0, 0.0); 143 162 glEnable(GL_DEPTH_TEST); … … 311 330 312 331 332 SDL_Surface* Orxonox::getScreen () 333 { 334 return this->screen; 335 } 313 336 314 337
Note: See TracChangeset
for help on using the changeset viewer.