UIElement.onDrawPBR

PBR layer draw method. This gives you 3 surfaces cropped by _position for drawing. Note that you are not forced to draw all to the surfaces at all, in which case the below UIElement 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: you MUST NOT draw outside dirtyRects. This allows more fine-grained updates. A UIElement that doesn't respect dirtyRects will have PAINFUL display problems.

class UIElement
protected public nothrow @nogc protected
void
onDrawPBR
(
ImageRef!RGBA diffuseMap
,
ImageRef!L16 depthMap
,
ImageRef!RGBA materialMap
,
box2i[] dirtyRects
)

Meta