-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rendertarget does not reflect latest spritebatch draw #239
Comments
I also ran into this problem, here's a gist with a minimal repro example if it's useful |
A few more people have run into this, so just as a starting point for anyone willing to dig into FNA3D: This is likely the result of timing issues with the copy pass and render pass; my guess is forcing a command flush and pipeline stall at the top of GetTextureData2D will "fix" it with a significant performance cost. We may need to forcibly end the render pass and flush commands so that we can start a copy pass that's submitted after rendering has occurred. |
I think we need to do this but with render commands above the Download call: https://github.com/FNA-XNA/FNA3D/blob/master/src/FNA3D_Driver_SDL.c#L3513 |
Once CI is finished the artifacts at #243 may resolve this issue. |
Awesome, thanks! That seems to have fixed it on my end. Will report back if there's any further issue. |
When saving screenshots in my editor, I create a new RenderTarget2D, draw the scene to it with spritebatch, then save the renderTarget to disk. With SDL 3.0 it started being a state behind so to speak, meaning that when it draws the scene, its how it looked before I made the changes. I have to save twice to get it to correctly draw now. Changing graphics driver to D3D11 fixes the problem.
The text was updated successfully, but these errors were encountered: