Skip to content

Commit a93241b

Browse files
authored
Add performance warning to Sprite.draw docstring (#1770)
1 parent 501ef3f commit a93241b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

arcade/sprite/sprite.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,14 @@ def face_point(self, point: Point) -> None:
327327

328328
def draw(self, *, filter=None, pixelated=None, blend_function=None) -> None:
329329
"""
330-
Draw the sprite.
330+
A debug method which draws the sprite into the current OpenGL context.
331+
332+
.. warning:: You are probably looking for :py:meth:`SpriteList.draw() <arcade.SpriteList.draw>`!
333+
334+
Drawing individual sprites is slow compared to using :py:class:`~arcade.SpriteList`.
335+
See :ref:`pg_spritelists_why` for more information.
336+
337+
This method should not be relied on. It may be removed one day.
331338
332339
:param filter: Optional parameter to set OpenGL filter, such as
333340
`gl.GL_NEAREST` to avoid smoothing.

0 commit comments

Comments
 (0)