-
Notifications
You must be signed in to change notification settings - Fork 77
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
Unexpected results when not setting draw-order #434
Comments
I'll look into this and hopefully will have a fix in the next version (expected to be out in the next week or two.) |
@ca1ek Can you provide the structure / data for the walls collection? It would help in reproducing your issue. |
@ryanisaacg I mailed you a .tar of the repo |
Having looked into the repo you provided, it seems the draw order bug is a wider problem in the Quicksilver API. If you don't provide a "z" value, Window feels free to rearrange your draw calls in any order it feels fits. For your specific case, a temporary solve is using In general, the core issue here is unexpected and leaky abstractions with Let me know if setting the Z value manually isn't sufficient! |
Well, if I set the z values manually it works alright, though I'm still used to the behavior of just painting over previous calls so I guess I'll just hack it a global variable that increases with each draw and resets to 0 with each frame. Though, undefined ordering is certainly not what anyone would except coming from a SDL background, so it should at least be noted in the docs. Also, sorry for the late reply. |
Changing the library API to address this is on my todo list at some point. Lately I've been very busy, and most of my open-source work has been going towards improving libraries Quicksilver depends on. |
This should be solved by the new graphics API! Check it out on the alpha version. |
Describe the bug
Rendering to a surface rather than straight to a window results in incorrect output.
To Reproduce
Here is the code I used, it seems both A and B should produce the same output but it's not the case.
A rendered B rendered
ps. I added flush calls at the end later, after taking the screenshot and it seemingly enlarged the output
pps. I ran the program a couple of times and it sometimes produces okay output, but most often bad. I haven't changed the code.
EDIT:
I moved the line
past the render_to(), before putting Surface on the screen, now I get this output. https://i.imgur.com/NnlLuz5.png
Environment and versions (please complete the following information):
The text was updated successfully, but these errors were encountered: