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 85906e6bd53feff0
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
     1.1 --- a/src/render/direct3d/SDL_render_d3d.c	Mon Mar 10 00:48:41 2014 -0400
     1.2 +++ b/src/render/direct3d/SDL_render_d3d.c	Sun Mar 09 22:48:38 2014 -0700
     1.3 @@ -648,10 +648,9 @@
     1.4      renderer->DestroyTexture = D3D_DestroyTexture;
     1.5      renderer->DestroyRenderer = D3D_DestroyRenderer;
     1.6      renderer->info = D3D_RenderDriver.info;
     1.7 +    renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
     1.8      renderer->driverdata = data;
     1.9  
    1.10 -    renderer->info.flags = SDL_RENDERER_ACCELERATED;
    1.11 -
    1.12      SDL_VERSION(&windowinfo.version);
    1.13      SDL_GetWindowWMInfo(window, &windowinfo);
    1.14  
     2.1 --- a/src/render/opengl/SDL_render_gl.c	Mon Mar 10 00:48:41 2014 -0400
     2.2 +++ b/src/render/opengl/SDL_render_gl.c	Sun Mar 09 22:48:38 2014 -0700
     2.3 @@ -447,7 +447,7 @@
     2.4      renderer->GL_BindTexture = GL_BindTexture;
     2.5      renderer->GL_UnbindTexture = GL_UnbindTexture;
     2.6      renderer->info = GL_RenderDriver.info;
     2.7 -    renderer->info.flags = SDL_RENDERER_ACCELERATED;
     2.8 +    renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
     2.9      renderer->driverdata = data;
    2.10      renderer->window = window;
    2.11  
     3.1 --- a/src/render/opengles/SDL_render_gles.c	Mon Mar 10 00:48:41 2014 -0400
     3.2 +++ b/src/render/opengles/SDL_render_gles.c	Sun Mar 09 22:48:38 2014 -0700
     3.3 @@ -103,7 +103,7 @@
     3.4      GLES_CreateRenderer,
     3.5      {
     3.6       "opengles",
     3.7 -     (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC ),
     3.8 +     (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC),
     3.9       1,
    3.10       {SDL_PIXELFORMAT_ABGR8888},
    3.11       0,
     4.1 --- a/src/render/opengles2/SDL_render_gles2.c	Mon Mar 10 00:48:41 2014 -0400
     4.2 +++ b/src/render/opengles2/SDL_render_gles2.c	Sun Mar 09 22:48:38 2014 -0700
     4.3 @@ -1784,7 +1784,7 @@
     4.4          return NULL;
     4.5      }
     4.6      renderer->info = GLES2_RenderDriver.info;
     4.7 -    renderer->info.flags = SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE;
     4.8 +    renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
     4.9      renderer->driverdata = data;
    4.10      renderer->window = window;
    4.11  
     5.1 --- a/src/render/psp/SDL_render_psp.c	Mon Mar 10 00:48:41 2014 -0400
     5.2 +++ b/src/render/psp/SDL_render_psp.c	Sun Mar 09 22:48:38 2014 -0700
     5.3 @@ -375,7 +375,7 @@
     5.4      renderer->DestroyTexture = PSP_DestroyTexture;
     5.5      renderer->DestroyRenderer = PSP_DestroyRenderer;
     5.6      renderer->info = PSP_RenderDriver.info;
     5.7 -    renderer->info.flags = SDL_RENDERER_ACCELERATED;
     5.8 +    renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
     5.9      renderer->driverdata = data;
    5.10      renderer->window = window;
    5.11