| Summary: | SDL_UpdateTexture or SDL_RenderCopy is malfunctioning | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Tom <tm1rbrt> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.0 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
| Attachments: | Test case | ||
I'm pretty sure you meant to use a non-zero pitch for SDL_UpdateTexture(). What happens if you change that line to this? SDL_UpdateTexture(tex, NULL, (void*) buf, 640*4); Yup that works. Sorry! I though pitch was a border between rows or something. Should have read the docs a little more carefully. Great, I'm glad you figured it out. :) |
Created attachment 1219 [details] Test case I built SDL2 from the release candidate source on the website with the latest version of mingw. SDL_RenderCopy seems to draw only the first line of the texture and stretch it over the rest of the window/render-surface. I have also tried with an explicit SDL_Rect rather than NULL (passed to UpdateTexture and RenderCopy) but get the same result.