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 - [2.0.4 RC2] Problem when using SDL_SetRenderTarget + SDL_RenderReadPixels (Windows only)
Summary: [2.0.4 RC2] Problem when using SDL_SetRenderTarget + SDL_RenderReadPixels (Wi...
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: don't know
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-29 06:24 UTC by jnmaloney
Modified: 2015-06-29 06:24 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.