Version: 2017.2

RenderTexture.GetNativeDepthBufferPtr

Cambiar al Manual
public IntPtr GetNativeDepthBufferPtr ();

Valor de retorno

IntPtr Apuntador a un recurso de fondo de profundidad del API gráfico subyacente.

Descripción

Recupera un apuntador (API gráfica subyacente) nativo al recurso del depth buffer.

Use this function to retrieve a pointer/handle corresponding to the depth buffer part of the RenderTexture, as it is represented on the native graphics API level. This can be used to enable depth buffer manipulation from native code plugins.

Use Texture.GetNativeTexturePtr to get a native pointer to the color buffer of a render texture, and this function to get to the depth buffer part. For Depth and ShadowMap render texture formats, the two functions return the same resource. The two functions will also return the same resource if anti aliasing is enabled in the project's quality settings.

Note that calling this function when using multi-threaded rendering will synchronize with the rendering thread (a slow operation), so best practice is to set up needed texture pointers only at initialization time.

See Also: Texture.GetNativeTexturePtr, Native code plugins.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961