Skip to content
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

How to keep previously rendered shapes? #123

Open
josiah-brown opened this issue Nov 28, 2020 · 1 comment
Open

How to keep previously rendered shapes? #123

josiah-brown opened this issue Nov 28, 2020 · 1 comment

Comments

@josiah-brown
Copy link

Thank you for the library! Is there an easy way to simply draw shapes in main without using the update and render functions. I am trying to draw a large number of shapes, one on top of the other, but they keep erasing when update is called. Any help is much appreciated.

@blacktm
Copy link
Member

blacktm commented Nov 29, 2020

Hi @josiah-brown. Sorry, nothing like that is built in. Behind the scenes, the graphics engine clears the back buffer, draws the contents in your render() function, then swaps the back buffer to the front buffer, or what is visible in the window. I'm sure it's possible to retain the contents drawn, but would have to figure out how to do that in a dual-buffered system, something like this. Alternatively, you might be interested in something like Cairo instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants