|
GetCaptureDepth | |
ZdepthValue = GetCaptureDepth() | |
Parameters: NONE | |
Returns: ZdepthValue = The Z depth to use for the following captured gfx commands |
|
GetCaptureDepth gets the current Z depth that any following captured graphics commands will be assigned. FACTS: * See CaptureDepth to change current capture depth. Mini Tutorial: This example first creates a camera in part 1. Then in the second part it redirects all graphics output to PlayBASIC's scene buffer. Using the CaptureDepth to control the order of the drawn items
If you test this example, you should notice something interesting occurring. While it simply draws two overlapping Blue & RED circles through a camera. If you look carefully, You'll may have noticed that even while the code renders the BLUE circle first, then the RED circle. The RED circle is actually drawn behind the BLUE circle. This occurs because prior to rendering each circle to the scene buffer, the code sets the Capturing Z depth of the following items we about to draw with the CaptureDepth command. If you look closely, the Blue circle is being captured at a depth of 1, while the Red circle is being capture a depth of 20. So what the camera does, is first order the items in the scene buffer from highest Z depth to lowest, then renders them in this order (highest to lowest). So items with a higher z depth, will be drawn behind items with a lower Z depth, regardless of what order we capture these drawing requests to the scene buffer in. |
Related Info: | CameraBasics | CaptureDepth | CaptureToScene | CaptureVis | ClsScene | GetCaptureVis : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |