Files
mql5-skills/skills/mql5/references/docs/31-directx/1073-directx-dxcontextgetdepth.md
T
2026-06-23 21:47:51 +08:00

30 lines
869 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DXContextGetDepth
Gets the depth buffer of a rendered frame.
```
bool  DXContextGetDepth(
   int     context,      // graphic context handle   
   float&  image[]       // depth value array 
   );
```
Parameters
context
[in]  Handle for a graphic context created in [DXContextCreate()](/en/docs/directx/dxcontextcreate).
image
[out]  Array of the rendered frame depth buffer values.
Return Value
In case of successful execution, returns true, otherwise - false. To receive an [error](/en/docs/constants/errorswarnings/errorcodes) code, the [GetLastError()](/en/docs/check/getlasterror) function should be called.
Note
The returned buffer contains the depth of each pixel of a rendered frame that can be obtained in [DXContextGetColors()](/en/docs/directx/dxcontextgetcolors) in relative units (from 0.0 to 1.0).