From b7f32f74cec28549e22f1247e21ce96ea202d5c0 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 31 Jul 2023 08:35:22 -0700 Subject: [PATCH] Note the removal of the SDL_RENDERER_TARGETTEXTURE flag Render targets are a core feature of SDL 3.0, so this flag has been removed. The OpenGL ES renderer still doesn't support them, but we'll deal with that later. Fixes https://github.com/libsdl-org/SDL/issues/8059 --- docs/README-migration.md | 2 ++ include/SDL3/SDL_render.h | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/README-migration.md b/docs/README-migration.md index 19b30414b..291037df0 100644 --- a/docs/README-migration.md +++ b/docs/README-migration.md @@ -698,6 +698,8 @@ which index is the "opengl" or whatnot driver, you can just pass that string dir here, now. Passing NULL is the same as passing -1 here in SDL2, to signify you want SDL to decide for you. +The SDL_RENDERER_TARGETTEXTURE flag has been removed, all current renderers support target texture functionality. + When a renderer is created, it will automatically set the logical size to the size of the window in points. For high DPI displays, this will set up scaling from points to pixels. You can disable this scaling with: diff --git a/include/SDL3/SDL_render.h b/include/SDL3/SDL_render.h index 61f47a5a0..f281f313f 100644 --- a/include/SDL3/SDL_render.h +++ b/include/SDL3/SDL_render.h @@ -778,10 +778,6 @@ extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture *texture); /** * Set a texture as the current rendering target. * - * Before using this function, you should check the - * `SDL_RENDERER_TARGETTEXTURE` bit in the flags of SDL_RendererInfo to see if - * render targets are supported. - * * The default render target is the window for which the renderer was created. * To stop rendering to a texture and render to the window again, call this * function with a NULL `texture`.