Loading...
Searching...
No Matches
hgiInterop.h
1//
2// Copyright 2020 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HGIINTEROP_HGIINTEROP_H
8#define PXR_IMAGING_HGIINTEROP_HGIINTEROP_H
9
10#include "pxr/pxr.h"
11#include "pxr/base/tf/token.h"
12#include "pxr/base/gf/vec4f.h"
13#include "pxr/base/gf/vec4i.h"
14#include "pxr/imaging/hgiInterop/api.h"
15#include "pxr/imaging/hgi/texture.h"
16
17#include <memory>
18
19PXR_NAMESPACE_OPEN_SCOPE
20
21class Hgi;
22class VtValue;
23
24struct HgiInteropImpl;
25
33class HgiInterop final
34{
35public:
36 HGIINTEROP_API
37 HgiInterop();
38
39 HGIINTEROP_API
41
80 HGIINTEROP_API
82 Hgi *srcHgi,
83 HgiTextureHandle const &srcColor,
84 HgiTextureHandle const &srcDepth,
85 TfToken const &dstApi,
86 VtValue const &dstFramebuffer,
87 GfVec4i const &dstRegion,
88 GfVec4f const &normalizedSrcRegion = GfVec4f(0.0F, 0.0F, 1.0F, 1.0F));
89
90private:
91 HgiInterop & operator=(const HgiInterop&) = delete;
92 HgiInterop(const HgiInterop&) = delete;
93
94 std::unique_ptr<HgiInteropImpl> _hgiInteropImpl;
95};
96
97
98PXR_NAMESPACE_CLOSE_SCOPE
99
100#endif
Basic type for a vector of 4 float components.
Definition vec4f.h:48
Basic type for a vector of 4 int components.
Definition vec4i.h:46
Hydra Graphics Interface.
Definition hgi.h:95
Hydra Graphics Interface Interop.
Definition hgiInterop.h:34
HGIINTEROP_API void TransferToApp(Hgi *srcHgi, HgiTextureHandle const &srcColor, HgiTextureHandle const &srcDepth, TfToken const &dstApi, VtValue const &dstFramebuffer, GfVec4i const &dstRegion, GfVec4f const &normalizedSrcRegion=GfVec4f(0.0F, 0.0F, 1.0F, 1.0F))
Composite the provided textures over the application / viewer's framebuffer contents.
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:81
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition value.h:90
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...