comparison src/video/win32/SDL_gapirender.c @ 3685:64ce267332c6

Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 21 Jan 2010 06:21:52 +0000
parents ce7d4942d18b
children f7b03b6838cb
comparison
equal deleted inserted replaced
3684:cc564f08884f 3685:64ce267332c6
428 428
429 429
430 SDL_Renderer * 430 SDL_Renderer *
431 GAPI_CreateRenderer(SDL_Window * window, Uint32 flags) 431 GAPI_CreateRenderer(SDL_Window * window, Uint32 flags)
432 { 432 {
433 SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window); 433 SDL_VideoDisplay *display = window->display;
434 SDL_WindowData *windowdata = (SDL_WindowData *) window->driverdata; 434 SDL_WindowData *windowdata = (SDL_WindowData *) window->driverdata;
435 SDL_DisplayMode *displayMode = &display->current_mode; 435 SDL_DisplayMode *displayMode = &display->current_mode;
436 SDL_Renderer *renderer; 436 SDL_Renderer *renderer;
437 GAPI_RenderData *data; 437 GAPI_RenderData *data;
438 int i, n; 438 int i, n;
470 renderer->RenderCopy = GAPI_RenderCopy; 470 renderer->RenderCopy = GAPI_RenderCopy;
471 renderer->RenderPresent = GAPI_RenderPresent; 471 renderer->RenderPresent = GAPI_RenderPresent;
472 renderer->DestroyRenderer = GAPI_DestroyRenderer; 472 renderer->DestroyRenderer = GAPI_DestroyRenderer;
473 renderer->info.name = GAPI_RenderDriver.info.name; 473 renderer->info.name = GAPI_RenderDriver.info.name;
474 renderer->info.flags = 0; 474 renderer->info.flags = 0;
475 renderer->window = window->id; 475 renderer->window = window;
476 renderer->driverdata = data; 476 renderer->driverdata = data;
477 477
478 /* Gapi provides only a framebuffer so lets use software implementation */ 478 /* Gapi provides only a framebuffer so lets use software implementation */
479 Setup_SoftwareRenderer(renderer); 479 Setup_SoftwareRenderer(renderer);
480 480