Fixed renderer flags to include support for target textures after the renderer is created.

This commit is contained in:
Sam Lantinga 2014-03-09 22:48:38 -07:00
parent 8c7ee701a1
commit a8f540fe4a
5 changed files with 5 additions and 6 deletions

View File

@ -648,10 +648,9 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
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);

View File

@ -447,7 +447,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
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;

View File

@ -103,7 +103,7 @@ SDL_RenderDriver GLES_RenderDriver = {
GLES_CreateRenderer,
{
"opengles",
(SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC ),
(SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC),
1,
{SDL_PIXELFORMAT_ABGR8888},
0,

View File

@ -1784,7 +1784,7 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
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;

View File

@ -375,7 +375,7 @@ PSP_CreateRenderer(SDL_Window * window, Uint32 flags)
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;