24 #ifndef PXR_IMAGING_HGI_TEXTURE_H
25 #define PXR_IMAGING_HGI_TEXTURE_H
29 #include "pxr/imaging/hgi/api.h"
30 #include "pxr/imaging/hgi/enums.h"
31 #include "pxr/imaging/hgi/handle.h"
32 #include "pxr/imaging/hgi/types.h"
37 PXR_NAMESPACE_OPEN_SCOPE
56 HgiComponentSwizzle r;
57 HgiComponentSwizzle g;
58 HgiComponentSwizzle b;
59 HgiComponentSwizzle a;
111 , format(HgiFormatInvalid)
113 HgiComponentSwizzleR,
114 HgiComponentSwizzleG,
115 HgiComponentSwizzleB,
116 HgiComponentSwizzleA}
117 , type(HgiTextureType2D)
121 , sampleCount(HgiSampleCount1)
123 , initialData(
nullptr)
126 std::string debugName;
127 HgiTextureUsage usage;
134 HgiSampleCount sampleCount;
135 size_t pixelsByteSize;
136 void const* initialData;
200 HgiTexture() =
delete;
201 HgiTexture & operator=(
const HgiTexture&) =
delete;
202 HgiTexture(
const HgiTexture&) =
delete;
207 using HgiTextureHandleVector = std::vector<HgiTextureHandle>;
241 : format(HgiFormatInvalid)
245 , sourceFirstLayer(0)
249 std::string debugName;
253 HgiTextureHandle sourceTexture;
254 uint16_t sourceFirstLayer;
255 uint16_t sourceFirstMip;
293 virtual ~HgiTextureView();
304 HgiTextureHandle _viewTexture;
307 HgiTextureView() =
delete;
308 HgiTextureView & operator=(
const HgiTextureView&) =
delete;
309 HgiTextureView(
const HgiTextureView&) =
delete;
313 using HgiTextureViewHandleVector = std::vector<HgiTextureViewHandle>;
315 PXR_NAMESPACE_CLOSE_SCOPE
virtual HGI_API size_t GetByteSizeOfResource() const =0
Returns the byte size of the GPU texture.
HGI_API HgiTextureDesc const & GetDescriptor() const
The descriptor describes the object.
virtual HGI_API uint64_t GetRawResource() const =0
This function returns the handle to the Hgi backend's gpu resource, cast to a uint64_t.
Describes the properties needed to create a GPU texture view from an existing GPU texture object...
AR_API bool operator!=(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
AR_API bool operator==(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
Describes the properties needed to create a GPU texture.
Describes color component mapping.
HGI_API HgiTextureHandle const & GetViewTexture() const
Returns the handle to the texture that aliases another texture.
Basic type for a vector of 3 int components.
Represents a graphics platform independent GPU texture resource.
HGI_API void SetViewTexture(HgiTextureHandle const &handle)
Set the handle to the texture that aliases another texture.
Represents a graphics platform independent GPU texture view resource.