turning smooth on and off (opengl)
in
Core Library Questions
•
1 year ago
so now that
opengl smoothing is working for me (thanks andres!), i'm wondering about how best to use it...
i have an application with, basically, a particle system and a GUI. the particle system only performs well with smoothing turned off; the GUI wants smoothing on to do things like draw circles and smooth animation.
however, turning smooth on and off every frame to render the particles and GUI alternately is not an option. from
PGraphicsOpenGL:
"The smooth/noSmooth functions are being called too often. |
This results in screen flickering, so they will be disabled |
for the rest of the sketch's execution." |
for the circles and diagonals in the GUI that need smoothing, i could conceivably draw to a buffer and blit that to the screen. however, some of the GUI content is animated, so i need to update it every screen.
...as i'm writing this, i think i'm realizing the answer -- create two buffers, each with their own renderers, one for the particle system and one for the GUI. particle system's renderer has smoothing always turned off; GUI's renderer has smoothing always turned on.
i'll give that a try when i have time and report back; in the meantime, if anyone has insight on this please share.
1