Loading...
Searching...
No Matches
textureBinder.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_HD_ST_TEXTURE_BINDER_H
8#define PXR_IMAGING_HD_ST_TEXTURE_BINDER_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hdSt/api.h"
12#include "pxr/imaging/hdSt/shaderCode.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
16using HdBufferSpecVector = std::vector<struct HdBufferSpec>;
18
28class HdSt_TextureBinder {
29public:
30 using NamedTextureHandle =
32 using NamedTextureHandleVector =
33 HdStShaderCode::NamedTextureHandleVector;
34
38 static void
39 GetBufferSpecs(
40 const NamedTextureHandleVector &textures,
41 HdBufferSpecVector * specs,
42 bool doublesSupported);
43
52 static void
53 ComputeBufferSources(
54 const NamedTextureHandleVector &textures,
55 HdBufferSourceSharedPtrVector * sources,
56 bool doublesSupported);
57
60 static void
61 BindResources(
62 HdSt_ResourceBinder const &binder,
63 const NamedTextureHandleVector &textures);
64
67 static void
68 UnbindResources(
69 HdSt_ResourceBinder const &binder,
70 const NamedTextureHandleVector &textures);
71
74 static void
75 GetBindingDescs(
76 HdSt_ResourceBinder const &binder,
77 HgiResourceBindingsDesc * bindingsDesc,
78 const NamedTextureHandleVector &textures);
79
80};
81
82PXR_NAMESPACE_CLOSE_SCOPE
83
84#endif // PXR_IMAGING_HD_ST_TEXTURE_BINDER_H
Information necessary to bind textures and create accessor for the texture.
Definition: shaderCode.h:127
Describes a set of resources that are bound to the GPU during encoding.