pub struct DrawCall { /* private fields */ }
Expand description
This represents an actual call to the GPU, or it can represent a
sub-View
, in case DrawCall::sub_view_id
is set. Note that all of this behaves
completely differently if DrawCall::sub_view_id
is set; all regular drawing fields
are ignored in that case!
TODO(JP): this sub-View
behavior is confusing, and we should instead
split this out to something like [enum DrawTreeItem { DrawCall(DrawCall), NestedView(usize) }
] or so.
That said, for a regular DrawCall
, this contains all the information that
you need to make a draw call on the GPU: the Shader
, DrawCall::instances
,
DrawCall::draw_uniforms
, and so on.
It is always kept in CxView::draw_calls
, and as said, is part of a tree
structure, called the “draw tree”. To print a textual representation of the
draw tree, use Cx::debug_flags_mut
.