No need to use a render target here.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 09 Feb 2014 15:20:41 -0500
changeset 8198 51935d107921
parent 8197 7e9a477d3e07
child 8199 a060c6a7ae4d
No need to use a render target here.
test/controllermap.c
--- a/test/controllermap.c	Sun Feb 09 03:09:56 2014 -0800
+++ b/test/controllermap.c	Sun Feb 09 15:20:41 2014 -0500
@@ -108,7 +108,7 @@
 {
     SDL_Window *window = NULL;
     SDL_Renderer *screen = NULL;
-    SDL_Texture *target, *background, *button, *axis, *marker;
+    SDL_Texture *background, *button, *axis, *marker;
     const char *name = NULL;
     SDL_bool retval = SDL_FALSE;
     SDL_bool done = SDL_FALSE, next=SDL_FALSE;
@@ -159,7 +159,6 @@
         return SDL_FALSE;
     }
     
-    target = SDL_CreateTexture(screen, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_TARGET, MAP_WIDTH, MAP_HEIGHT);
     background = LoadTexture(screen, "controllermap.bmp", SDL_FALSE);
     button = LoadTexture(screen, "button.bmp", SDL_TRUE);
     axis = LoadTexture(screen, "axis.bmp", SDL_TRUE);
@@ -226,13 +225,10 @@
                 }
             }
             
-            SDL_SetRenderTarget(screen, target);
             SDL_RenderCopy(screen, background, NULL, NULL);
             SDL_SetTextureAlphaMod(marker, alpha);
             SDL_SetTextureColorMod(marker, 10, 255, 21);
             SDL_RenderCopyEx(screen, marker, NULL, &dst, step->angle, NULL, 0);
-            SDL_SetRenderTarget(screen, NULL);
-            SDL_RenderCopy(screen, target, NULL, NULL);
             SDL_RenderPresent(screen);
             
             if (SDL_PollEvent(&event)) {