You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Clear removes all drawn shapes from the IM. This does not remove Pushed points.
func (imd *IMDraw) Clear()
// Reset restores all point properties to defaults and removes all Pushed points.
//
// This does not affect matrix and color mask set by SetMatrix and SetColorMask.
func (imd *IMDraw) Reset()
Pushing new points in the main loop is no good since Clear() doesn't empty already pushed points but for some reason it works just fine. Only the recently pushed points are drawn to the screen. Am I missing something?
Also, Reset() supposedly removes all the pushed points but in this case it doesn't work. All the points pushed up until that moment is drawn to the screen. That's probably because old points were already drawn to the framebuffer and reset doesn't clear the buffer but it's really confusing.
Another nitpick would be that even If I use both there is no way to completely reset an imdraw object since it doesn't affect matrix and color mask.
So what's the best way to have a dynamically changing imdraw setup?
According to documentation below
Pushing new points in the main loop is no good since
Clear()
doesn't empty already pushed points but for some reason it works just fine. Only the recently pushed points are drawn to the screen. Am I missing something?Also,
Reset()
supposedly removes all the pushed points but in this case it doesn't work. All the points pushed up until that moment is drawn to the screen. That's probably because old points were already drawn to the framebuffer and reset doesn't clear the buffer but it's really confusing.Another nitpick would be that even If I use both there is no way to completely reset an
imdraw
object since it doesn't affect matrix and color mask.So what's the best way to have a dynamically changing imdraw setup?
Thanks
Original issue: faiface/pixel#216
The text was updated successfully, but these errors were encountered: