-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Render operations take too long #341
Comments
Do you have a code example to help reproduce the problem? I suspect a bad manipulation or faulty hardware, because there would be way much of a bigger uproar had this been the case... |
See the Pastebin here. |
The default color is white and you set it again to white. Then you draw with SDL_RenderFillRect, which, when the argument is NULL, draws over the entire render target (your whole screen) with said new white. Then we present the result, which is of course, going to look blank. For fun, I switched to red and it behaved as expected and could not reproduce your issue.
|
It does appear to be the behavior of native SDL2 when I run the C equivalent of the example which is this:
I have put a note about this in the README.md under the FAQ section. |
When doing drawing operations the renderers buffer is not immediately updated. If e.g. I fill a rect and directly present afterwards the rect will not be drawn.
I think this is an issue with sdl. Either they are not mentioning it in their docu or is indeed a bug. It could however be solved within go. But I would recommend against since it would just be a workaround and not a fix. However this could be noted in the documentation of go-sdl2 that drawing operations take a while to succeed.
The text was updated successfully, but these errors were encountered: