gamnit :: Sprite :: draw_order
Change this value to avoid artifacts when drawing non-opaque sprites.
In general, sprites with a non-opaque texture
and sprites closer to
the camera should have a higher value to be drawn last.
Sprites sharing a draw_order
are drawn in the same pass.
The sprite to sprite draw order is undefined and may change when adding
and removing sprites, or changing their attributes.
Changing this value may have a negative performance impact if there are
many different draw_order
values across many sprites.
Sprites sharing some attributes are drawn as group to reduce
the communication overhead between the CPU and GPU,
and changing draw_order
may break up large groups into smaller groups.
# Draw order, higher values cause this sprite to be drawn latter
#
# Change this value to avoid artifacts when drawing non-opaque sprites.
# In general, sprites with a non-opaque `texture` and sprites closer to
# the camera should have a higher value to be drawn last.
#
# Sprites sharing a `draw_order` are drawn in the same pass.
# The sprite to sprite draw order is undefined and may change when adding
# and removing sprites, or changing their attributes.
#
# ### Warning
#
# Changing this value may have a negative performance impact if there are
# many different `draw_order` values across many sprites.
# Sprites sharing some attributes are drawn as group to reduce
# the communication overhead between the CPU and GPU,
# and changing `draw_order` may break up large groups into smaller groups.
var draw_order = 0 is writable(draw_order_direct=)
lib/gamnit/flat/flat_core.nit:244,2--261,51