Only clear renderer if necessary.

This commit is contained in:
Sascha L. Teichmann 2017-02-27 20:10:49 +01:00
parent 3a9fd0ca1e
commit 58d930e1d2
1 changed files with 5 additions and 0 deletions

View File

@ -147,6 +147,11 @@ func (r *Renderer) SetPos(xOfs, zOfs int16) {
}
func (r *Renderer) Reset() {
if r.IsEmpty() {
return
}
yb := r.yBuffer
yb = yb[:len(yb)]
for i := range yb {