/[usata]/usata2/src/system.cpp
ViewVC logotype

Diff of /usata2/src/system.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by skunix, Sun Dec 26 09:35:23 2004 UTC revision 1.11 by Descender, Sun Dec 26 18:36:42 2004 UTC
# Line 11  Line 11 
11  // http://www.fsf.org/licenses/gpl.html.  // http://www.fsf.org/licenses/gpl.html.
12  //  //
13  // $Id$  // $Id$
 // $Log$  
 // Revision 1.10  2004/12/26 09:35:23  skunix  
 // use logging functionality  
 //  
 // Revision 1.9  2004/12/26 08:03:34  skunix  
 // changed lambda::bind's to boost::binds  
 //  
 // Revision 1.8  2004/12/25 19:21:44  skunix  
 // removed extra stuff  
 //  
 // Revision 1.7  2004/12/23 19:05:11  skunix  
 // added usata::time::get_ticks  
 //  
 // Revision 1.6  2004/12/22 23:35:19  Descender  
 //  
 // Fix license headers  
 //  
14    
15  #include "system.hpp"  #include "system.hpp"
16  #include <SDL.h>  #include <SDL.h>
# Line 52  namespace system Line 35  namespace system
35                                  throw std::runtime_error((const char*)(glewGetErrorString(err)));                                  throw std::runtime_error((const char*)(glewGetErrorString(err)));
36                          }                          }
37    
38                          log::Stream s(&log::server);                          log::stream << "GLEW initialized\n";
                         s << "GLEW initialized\n";  
           
39                          return;                          return;
40                  }                  }
41    
# Line 134  namespace system Line 115  namespace system
115          {          {
116                  Uint32 Flags = SDL_OPENGL | (vm.fullscreen?SDL_FULLSCREEN:0);                  Uint32 Flags = SDL_OPENGL | (vm.fullscreen?SDL_FULLSCREEN:0);
117                  const SDL_VideoInfo* vi = SDL_GetVideoInfo();                  const SDL_VideoInfo* vi = SDL_GetVideoInfo();
118                  log::Stream2 logstream;                  log::BufferedStream logstream;
119    
120                  int depth = vi->vfmt->BitsPerPixel;                  int depth = vi->vfmt->BitsPerPixel;
121    
# Line 143  namespace system Line 124  namespace system
124                  if (success)                  if (success)
125                  {                  {
126                          SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE,&depth);                          SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE,&depth);
127                          logstream << "set video mode ok, GL_DEPTH_SIZE (" << depth <<")" << log::Commit;                          logstream << "set video mode ok, GL_DEPTH_SIZE (" << depth <<")" << log::commit;
128                          init_glew();                          init_glew();
129                  }                  }
130                  else                  else
131                  {                  {
132                          logstream << log::set_level(log::Level::ERROR) << SDL_GetError() << log::Commit;                          logstream << log::set_level(log::Level::ERROR) << SDL_GetError() << log::commit;
133                  }                  }
134    
135          }          }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26