diff --git a/Performance-Tips.md b/Performance-Tips.md index 06485f0..4ca9a41 100644 --- a/Performance-Tips.md +++ b/Performance-Tips.md @@ -31,3 +31,11 @@ B.DrawImage(A, op) # Avoid using the screen as a render source The screen is a special image because the image is cleared at every frame. As explained above, Ebiten records a drawing function calls but using the screen as a render source makes the calculation complicated. + +# Don't call (*Image).ReplacePixels too much + +ReplacePixels is a relatively heavy function that calls glTexSubImage2D internally. + +# Don't call (*Image).At too much + +At is also heavy that tries to solve all the queued draw commands.