Browse Source

Merge pull request #5083 from godotengine/lawnjelly-patch-batching-primitives

Note which primitives can currently be batched
Max Hilbrunner 4 years ago
parent
commit
6ce5aff2b1
1 changed files with 16 additions and 0 deletions
  1. 16 0
      tutorials/optimization/batching.rst

+ 16 - 0
tutorials/optimization/batching.rst

@@ -514,6 +514,22 @@ I use a large number of textures, so few items are being batched.
 Appendix
 ~~~~~~~~
 
+Batched primitives
+^^^^^^^^^^^^^^^^^^
+
+Not all primitives can be batched. Batching is not guaranteed either,
+especially with primitives using an antialiased border. The following
+primitive types are currently available:
+
+- RECT
+- NINEPATCH (depending on wrapping mode)
+- POLY
+- LINE
+
+With non-batched primitives, you may be able to get better performance by
+drawing them manually with polys in a ``_draw()`` function.
+See :ref:`doc_custom_drawing_in_2d` for more information.
+
 .. _doc_batching_light_scissoring_threshold_calculation:
 
 Light scissoring threshold calculation