src/sdl/hardware_renderer.cc
/*
 * Attempts to create a hardware rendering object. Returns NULL on failure.
 */
Attempts to create a hardware rendering object. Returns NULL on failure.
Attempts to create a hardware rendering object . Returns NULL on failure .
HardwareRenderer *HardwareRenderer::Create(SDL_Window *window) {
  if (window == NULL) { return NULL; }
  SDL_Renderer *renderer = SDL_CreateRenderer(window, -1,
                           SDL_RENDERER_ACCELERATED);
  if (renderer == NULL) { return NULL; }
  return new HardwareRenderer(window, renderer);
}
HardwareRenderer * HardwareRenderer :: Create ( SDL_Window * window ) { if ( window == NULL ) { return NULL ; } SDL_Renderer * renderer = SDL_CreateRenderer ( window , -1 , SDL_RENDERER_ACCELERATED ) ; if ( renderer == NULL ) { return NULL ; } return new HardwareRenderer ( window , renderer ) ; }
Attempts to create a hardware rendering object.
Attempts to create a hardware rendering object .
// Ensure that the provided window is non-null. // Attempt to create a hardware renderer. // Verify that the renderer was created successfully. // Return the HardwareRenderer object.