Example #1
0
void graphics_init() {

  int error = SDL_InitSubSystem(SDL_INIT_VIDEO);
  if (error == -1) {
    error("Cannot initialize SDL video!");
  }

  window_width = 0;
  window_height = 0;
  window_flags = SDL_OPENGL;
  window_vsync = true;
  window_multisamples = 4;
  window_multisamplesbuffs = 1;
  window_antialiasing = 1;
  
  graphics_viewport_set_title("Corange");
  graphics_viewport_start();
  
  window_width = screen->w;
  window_height = screen->h;
  
  SDL_GL_PrintInfo();
  SDL_GL_PrintExtensions();

  SDL_WM_UseResourceIcon();
}
Example #2
0
void graphics_init() {

  int error = SDL_InitSubSystem(SDL_INIT_VIDEO);
  
  if (error == -1) {
    error("Cannot initialize SDL video!");
  }

  window_flags = SDL_WINDOW_OPENGL;
  window_multisamples = 4;
  window_multisamplesbuffs = 1;
  window_antialiasing = 1;
  
  graphics_viewport_start();
  
  SDL_GL_PrintInfo();
  SDL_GL_PrintExtensions();
}
Example #3
0
void graphics_manager_init() {

  int error = SDL_Init(SDL_INIT_VIDEO);
  if (error == -1) {
    error("Cannot initialize SDL video!");
  }

  window_width = DEFAULT_WIDTH;
  window_height = DEFAULT_HEIGHT;
  window_flags = SDL_OPENGL;
  window_vsync = 1;
  window_multisamples = 4;
  window_multisamplesbuffs = 1;
  
  graphics_viewport_set_title("Corange");
  graphics_viewport_start();
  
  SDL_GL_PrintInfo();
  SDL_GL_PrintExtensions();
  SDL_GL_LoadExtensions();

  SDL_WM_UseResourceIcon();
}