Draw method. This gives you 3 surfaces cropped by _position for drawing. Note that you are not forced to draw all the surfaces at all, in which case the
below backgroundUIElement will be displayed.
UIElement are drawn by increasing z-order, or lexical order if lack thereof.
Those elements who have non-overlapping _position are drawn in parallel.
Hence you CAN'T draw outside _position and receive cropped surfaces.
diffuseMap, depthMap and materialMap are made to span _position exactly.
IMPORTANT: For better efficiency, you SHALL NOT draw part outside dirtyRects.
This allows more fine-grained updates.
A UIElement that doesn't respect dirtyRects will have display problems if it overlaps with another UIElement.
Draw method. This gives you 3 surfaces cropped by _position for drawing. Note that you are not forced to draw all the surfaces at all, in which case the below backgroundUIElement will be displayed.
UIElement are drawn by increasing z-order, or lexical order if lack thereof. Those elements who have non-overlapping _position are drawn in parallel. Hence you CAN'T draw outside _position and receive cropped surfaces. diffuseMap, depthMap and materialMap are made to span _position exactly.
IMPORTANT: For better efficiency, you SHALL NOT draw part outside dirtyRects. This allows more fine-grained updates. A UIElement that doesn't respect dirtyRects will have display problems if it overlaps with another UIElement.