We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3044

Summary: [2.0.4 RC2] Problem when using SDL_SetRenderTarget + SDL_RenderReadPixels (Windows only)
Product: SDL Reporter: jnmaloney
Component: renderAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: don't know   
Hardware: x86_64   
OS: Windows 7   

Description jnmaloney 2015-06-29 06:24:29 UTC
I'm still experiencing this bug on Windows in 2.0.4 RC2.

https://bugzilla.libsdl.org/show_bug.cgi?id=2705

Using the code:

  SDL_SetRenderTarget(m_renderer, m_targetTex);
  int readResult = SDL_RenderReadPixels(m_renderer, NULL, SDL_PIXELFORMAT_ARGB8888, pixelData, pitch);
  SDL_SetRenderTarget(m_renderer, NULL);

The actual pixel data is grabbed from the backbuffer, and not the render target.