sdl2_frt/src/render/direct3d11
Sam Lantinga d4b561f472 Fixed bug 5015 - SDL_RenderReadPixels on DirectX 11.1 backend seems to be broken
Konrad

It appears that I cannot use SDL_RenderReadPixels on a bound framebuffer (SDL_Texture set as render target) as it simply results in gibberish data. However, drawing that framebuffer into the default target (window surface) does render it correctly. Other backends (OpenGL, software, Direct3D) do work fine.

It looks to me like D3D11_RenderReadPixels just gets the general backbuffer and not the current render target and its backbuffer.

Here is the patch which actually fetches the current render target and its underlying ID3D11Resource which is ID3D11Texture2D.
2020-04-05 08:58:47 -07:00
..
SDL_render_d3d11.c Fixed bug 5015 - SDL_RenderReadPixels on DirectX 11.1 backend seems to be broken 2020-04-05 08:58:47 -07:00
SDL_render_winrt.cpp Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
SDL_render_winrt.h Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
SDL_shaders_d3d11.c Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
SDL_shaders_d3d11.h Updated copyright date for 2020 2020-01-16 20:49:25 -08:00