From 4b8c05746c23149efc63ab6ee1d73bc1ad814259 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 24 Aug 2017 01:05:20 +0900 Subject: [PATCH] Created Performance Tips (markdown) --- Performance-Tips.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Performance-Tips.md diff --git a/Performance-Tips.md b/Performance-Tips.md new file mode 100644 index 0000000..c96ed69 --- /dev/null +++ b/Performance-Tips.md @@ -0,0 +1,13 @@ +# Draw commands + +The less draw commands, the better the performance is. + +One drawing function like `DrawImage` or `Fill` is treated as one (internal) draw command, but there is an exception. The two or more successive commands are treated as one draw command when + +* All functions are `DrawImage` +* All the render targets are same +* All the render sources are same +* All the color matrices are same +* All the composite modes are same + +examples/sprites is a good example to draw > 10000 sprites with one draw commands.