You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug report was migrated from our old Bugzilla tracker.
Reported in version: don't know Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2017-10-29 02:08:57 +0000, Ellie wrote:
SDL_HideWindow will also suspend rendering with SDL_RenderPresent(). I planned to use a hidden window for offscreen rendering (the main window is handled by something else than SDL and has no OpenGL context) but due to this problem I can't. It'd be nice if there was a way to make this work without being forced to have an additional useless window visible.
On 2017-10-29 02:11:18 +0000, Ellie wrote:
I forgot to mention what I'm actually doing: I'm using SDL_RenderReadPixels to extract the pixels after rendering a frame, and with the hidden window I simply get a pitch black texture instead of the actual image. If I change nothing else except commenting the line that hides the window, everything works fine and I can extract the proper image.
On 2017-12-27 12:09:47 +0000, Ellie wrote:
Anyone?
I need off-screen rendering in a couple of places, and this makes it really challenging ot use SDL2 for that purpose.
Any sort of feedback on whether this is unavoidable per design or a fixable bug would already be nice, because if there is no hope this ever gets addressed I'll have to look into other options than SDL2.
On 2018-01-03 18:01:49 +0000, Sam Lantinga wrote:
Ryan, can you take a look at this? Is there something we need to set to allow off-screen rendering?
On 2018-01-04 18:50:00 +0000, Ryan C. Gordon wrote:
Does this work if you use a render target instead of rendering directly to the hidden window?
--ryan.
On 2018-01-04 21:19:50 +0000, Ellie wrote:
I didn't try render targets, because the API doesn't appear to support SDL_TEXTUREACCESS_TARGET and SDL_TEXTUREACCESS_STREAMING at the same time since they are enumerations and not flags. Therefore, I'd either need a way to combine SDL_TEXTUREACCESS_TARGET and SDL_TEXTUREACCESS_STREAMING on one SDL_Texture, or I have no other way than to rely on SDL_RenderReadPixels() to get the end result again, which is what I used in the end. Did I miss something so that I can do this with render targets without using OpenGL code myself?
On 2018-02-02 03:26:31 +0000, Ryan C. Gordon wrote:
So my suspicion is that X11 won't render to an unmapped window; hiding a window unmaps it. You might be able to place the window entirely offscreen (at like, position -10000,-10000) to get around this, but I haven't tried.
That being said: SDL_RenderReadPixels() works from render targets, and you don't need to mark them as streaming. I think these will work even if the window is unmapped.
--ryan.
On 2018-02-07 18:27:50 +0000, Ryan C. Gordon wrote:
Going to close this as WONTFIX for now. If you try any of these things (moving the window way offscreen or a render target) and nothing works, we can brainstorm some more.
--ryan.
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
Reported in version: don't know
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2017-10-29 02:08:57 +0000, Ellie wrote:
On 2017-10-29 02:11:18 +0000, Ellie wrote:
On 2017-12-27 12:09:47 +0000, Ellie wrote:
On 2018-01-03 18:01:49 +0000, Sam Lantinga wrote:
On 2018-01-04 18:50:00 +0000, Ryan C. Gordon wrote:
On 2018-01-04 21:19:50 +0000, Ellie wrote:
On 2018-02-02 03:26:31 +0000, Ryan C. Gordon wrote:
On 2018-02-07 18:27:50 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: