Layering Restrictions

As a developer using Starling (and thus Stage 3D), you need to remember one limitation when developing content. As mentioned earlier, Stage3D is literally a new rendering architecture inside Flash Player and AIR. A GPU surface is placed under the display list, meaning that any content running inside the display list will be placed above the Stage3D content. At no time can content running in the display list be placed under the Stage3D layer. Figure 1-7 illustrates the layering.

Note that the Stage3D object cannot be transparent; such a capability would allow developers to play video using the StageVideo technology (introduced in Flash Player 10.2; http://www.adobe.com/devnet/flashplayer/articles/stage_video.html) and overlay the video with content rendered through Stage3D. Such a feature may be enabled in a future release of the Flash Player and AIR.

Layering with Stage3D, StageVideo, and the display list

Figure 1-7. Layering with Stage3D, StageVideo, and the display list

Get Introducing Starling now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.