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

Draw to texture #864

Open
keenanwoodall opened this issue Jun 6, 2022 · 0 comments
Open

Draw to texture #864

keenanwoodall opened this issue Jun 6, 2022 · 0 comments

Comments

@keenanwoodall
Copy link

Hello! I am new to nannou and am really enjoying it. Thank you for creating such an excellent toolkit!
One thing I'm finding that I often want to do is to draw directly to a texture. Is this possible? I have struggled to find a beginner-friendly way to do this.

For example, I'm currently trying to draw long-lasting trails that follow the bob of a pendulum. I'd like to avoid storing an ever-growing vector of points that is redrawn every frame via a polyline. Instead, for every frame, I'd like to draw the newest segment of the trail to a texture that is never cleared. I could then draw the actual pendulum (which will be cleared) on top of the texture. This would allow me to have a performant trail that doesn't get more expensive to render the longer the program runs, and I could even accumulate cool image operations like a blur - how exciting!

I imagine this is already possible? Apologies if I've missed it somehow, but I'd appreciate being pointed in the right direction if it is!

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

1 participant