No need to use a render target here.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 09 Feb 2014 15:20:41 -0500
changeset 819851935d107921
parent 8197 7e9a477d3e07
child 8199 a060c6a7ae4d
No need to use a render target here.
test/controllermap.c
     1.1 --- a/test/controllermap.c	Sun Feb 09 03:09:56 2014 -0800
     1.2 +++ b/test/controllermap.c	Sun Feb 09 15:20:41 2014 -0500
     1.3 @@ -108,7 +108,7 @@
     1.4  {
     1.5      SDL_Window *window = NULL;
     1.6      SDL_Renderer *screen = NULL;
     1.7 -    SDL_Texture *target, *background, *button, *axis, *marker;
     1.8 +    SDL_Texture *background, *button, *axis, *marker;
     1.9      const char *name = NULL;
    1.10      SDL_bool retval = SDL_FALSE;
    1.11      SDL_bool done = SDL_FALSE, next=SDL_FALSE;
    1.12 @@ -159,7 +159,6 @@
    1.13          return SDL_FALSE;
    1.14      }
    1.15      
    1.16 -    target = SDL_CreateTexture(screen, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_TARGET, MAP_WIDTH, MAP_HEIGHT);
    1.17      background = LoadTexture(screen, "controllermap.bmp", SDL_FALSE);
    1.18      button = LoadTexture(screen, "button.bmp", SDL_TRUE);
    1.19      axis = LoadTexture(screen, "axis.bmp", SDL_TRUE);
    1.20 @@ -226,13 +225,10 @@
    1.21                  }
    1.22              }
    1.23              
    1.24 -            SDL_SetRenderTarget(screen, target);
    1.25              SDL_RenderCopy(screen, background, NULL, NULL);
    1.26              SDL_SetTextureAlphaMod(marker, alpha);
    1.27              SDL_SetTextureColorMod(marker, 10, 255, 21);
    1.28              SDL_RenderCopyEx(screen, marker, NULL, &dst, step->angle, NULL, 0);
    1.29 -            SDL_SetRenderTarget(screen, NULL);
    1.30 -            SDL_RenderCopy(screen, target, NULL, NULL);
    1.31              SDL_RenderPresent(screen);
    1.32              
    1.33              if (SDL_PollEvent(&event)) {