Re: Change TEXTURE_ACCESS from TARGET to STREAMING
Travis McKinney <[email protected]>
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <CA+Xw96ghgNRNT13ZVtcYgptmh5Fo8u8Bkr-6WzB6ZFZLfb888A@mail.gmail.com> |
SDL_RenderReadPixels(renderer, NULL, SDL_PIXELFORMAT_RGBA8888, streamingPixels, streamingPitch * -1); On 9 October 2016 at 16:30, Travis McKinney <[email protected]> wrote: > Can a negative pitch/stride be used to flip the buffer? > > On 9 October 2016 at 16:02, stewambo <[email protected]> wrote: > >> Yes, that's the bug I'm having and your "solution" worked, however I >> don't really like it, because it just draws the texture I want to convert >> onto my main renderer and IF I would call it every frame I would see this >> texture in the top left corner of my window. Of course I wouldn't call it >> every frame, but in my case only every couple of seconds or even minutes, >> depending on whats happening in game, but it still bugs me that i would be >> able to see a texture that has nothing to do there... >> >> Would it be easier to to the pixel manipulation on a surface instead of a >> streaming texture? Would it even be possible to create a surface from a >> texture without the use of SDL_RenderReadPixels? And what has better >> performance? Using a streaming texture or changing the pixels on a surface >> and then creating a texture out of it? >> >> _______________________________________________ >> SDL mailing list >> [email protected] >> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org >> >> > _______________________________________________ SDL mailing list [email protected] http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org