Fixed renderer flags to include support for target textures after the renderer is created.
authorSam Lantinga <slouken@libsdl.org>
Sun, 09 Mar 2014 22:48:38 -0700
changeset 8590 6e6bd53feff0
parent 8589 65d0979cdf08
child 8591 2228ae5a3ac6
Fixed renderer flags to include support for target textures after the renderer is created.
src/render/direct3d/SDL_render_d3d.c
src/render/opengl/SDL_render_gl.c
src/render/opengles/SDL_render_gles.c
src/render/opengles2/SDL_render_gles2.c
src/render/psp/SDL_render_psp.c
--- a/src/render/direct3d/SDL_render_d3d.c	Mon Mar 10 00:48:41 2014 -0400
+++ b/src/render/direct3d/SDL_render_d3d.c	Sun Mar 09 22:48:38 2014 -0700
@@ -648,10 +648,9 @@
     renderer->DestroyTexture = D3D_DestroyTexture;
     renderer->DestroyRenderer = D3D_DestroyRenderer;
     renderer->info = D3D_RenderDriver.info;
+    renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
     renderer->driverdata = data;
 
-    renderer->info.flags = SDL_RENDERER_ACCELERATED;
-
     SDL_VERSION(&windowinfo.version);
     SDL_GetWindowWMInfo(window, &windowinfo);
 
--- a/src/render/opengl/SDL_render_gl.c	Mon Mar 10 00:48:41 2014 -0400
+++ b/src/render/opengl/SDL_render_gl.c	Sun Mar 09 22:48:38 2014 -0700
@@ -447,7 +447,7 @@
     renderer->GL_BindTexture = GL_BindTexture;
     renderer->GL_UnbindTexture = GL_UnbindTexture;
     renderer->info = GL_RenderDriver.info;
-    renderer->info.flags = SDL_RENDERER_ACCELERATED;
+    renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
     renderer->driverdata = data;
     renderer->window = window;
 
--- a/src/render/opengles/SDL_render_gles.c	Mon Mar 10 00:48:41 2014 -0400
+++ b/src/render/opengles/SDL_render_gles.c	Sun Mar 09 22:48:38 2014 -0700
@@ -103,7 +103,7 @@
     GLES_CreateRenderer,
     {
      "opengles",
-     (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC ),
+     (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC),
      1,
      {SDL_PIXELFORMAT_ABGR8888},
      0,
--- a/src/render/opengles2/SDL_render_gles2.c	Mon Mar 10 00:48:41 2014 -0400
+++ b/src/render/opengles2/SDL_render_gles2.c	Sun Mar 09 22:48:38 2014 -0700
@@ -1784,7 +1784,7 @@
         return NULL;
     }
     renderer->info = GLES2_RenderDriver.info;
-    renderer->info.flags = SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE;
+    renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
     renderer->driverdata = data;
     renderer->window = window;
 
--- a/src/render/psp/SDL_render_psp.c	Mon Mar 10 00:48:41 2014 -0400
+++ b/src/render/psp/SDL_render_psp.c	Sun Mar 09 22:48:38 2014 -0700
@@ -375,7 +375,7 @@
     renderer->DestroyTexture = PSP_DestroyTexture;
     renderer->DestroyRenderer = PSP_DestroyRenderer;
     renderer->info = PSP_RenderDriver.info;
-    renderer->info.flags = SDL_RENDERER_ACCELERATED;
+    renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
     renderer->driverdata = data;
     renderer->window = window;