diff --git a/gym/envs/box2d/car_racing.py b/gym/envs/box2d/car_racing.py index 78a0af5538c..a914fc65fe9 100644 --- a/gym/envs/box2d/car_racing.py +++ b/gym/envs/box2d/car_racing.py @@ -528,6 +528,7 @@ def render_road(self): len(polygons_) // 3, ("v3f", polygons_), ("c4f", colors) # gl.GL_QUADS, ) vl.draw(gl.GL_QUADS) + vl.delete() def render_indicators(self, W, H): s = W / 40.0 @@ -589,6 +590,7 @@ def horiz_ind(place, val, color): len(polygons) // 3, ("v3f", polygons), ("c4f", colors) # gl.GL_QUADS, ) vl.draw(gl.GL_QUADS) + vl.delete() self.score_label.text = "%04i" % self.reward self.score_label.draw()