All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HgiInterop Class Referencefinal

#include <hgiInterop.h>

Public Member Functions

HGIINTEROP_API void TransferToApp (Hgi *hgi, TfToken const &interopDst, HgiTextureHandle const &color, HgiTextureHandle const &depth)

Detailed Description

Hydra Graphics Interface Interop.

HgiInterop provides functionality to transfer render targets between supported APIs as efficiently as possible.

Definition at line 47 of file hgiInterop.h.

Constructor & Destructor Documentation

HGIINTEROP_API HgiInterop::HgiInterop ( )
HGIINTEROP_API HgiInterop::~HgiInterop ( )

Member Function Documentation

HGIINTEROP_API void HgiInterop::TransferToApp ( Hgi hgi,
TfToken const interopDst,
HgiTextureHandle const color,
HgiTextureHandle const depth 

Composite the provided textures with the application / viewer's framebuffer contents. hgi: Determines the source format/platform of the textures. Eg. if hgi is of type HgiMetal, the textures are HgiMetalTexture. interopDst: Determines what target format/platform the application is using. E.g. If hgi==HgiMetal and interopDst==OpenGL then TransferToApp will present the metal textures to the gl application. color: is the source color aov texture to composite to screen. depth: (optional) is the depth aov texture to composite to screen.

Note: To composite correctly, blending is enabled. If depth is provided, depth testing is enabled. As a result, the contents of the application framebuffer matter. In order to use the contents of color and depth as-is (i.e., blit), the color attachment should be cleared to (0,0,0,0) and the depth attachment needs to be cleared to 1.

The documentation for this class was generated from the following file: