-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
erase() and noErase() support in framebuffers #6523
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you! |
Sounds like a bug! Are you able to make a minimal example in a p5 editor sketch to debug with? |
Yes! There you have it: The erase() function is erasing the main canvas, rather than the framebuffer. |
If I comment out the last line with the |
Yes, you're definitely right! |
Looks like the bug is here: p5.js/src/webgl/p5.RendererGL.js Line 1165 in 28740f9
|
This makes the whole framebuffer white, though (except for the erased part)? |
You're right! Just updated the sketch again, looks like we still have to call |
Yes! Although noErase() was not working, because blendMode was not reverting back to the original. We need to store the current blendmode and pass it at the end. I made a bad fix: |
Thanks! Are you interested in combining the changes in that sketch into a PR? |
I'm pretty new to OpenSource. Currently creating a p5 library as a first contribution to the project. |
If youre interested, I can help walk you through it! We also have a p5 discord where you can ask questions faster. If you'd rather not though, that's also totally fine! |
Topic
I'm trying to execute erase() and noErase() within the framebuffer.begin() and framebuffer.end() functions, but they seem to be ignored. Bug or feature missing?
Thanks in advance!
The text was updated successfully, but these errors were encountered: