HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
types.h File Reference
#include "pxr/pxr.h"
#include "pxr/imaging/hio/api.h"
#include <stdlib.h>
#include <cinttypes>
+ Include dependency graph for types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  HioFormat {
  HioFormatInvalid =-1, HioFormatUNorm8 =0, HioFormatUNorm8Vec2, HioFormatUNorm8Vec3,
  HioFormatUNorm8Vec4, HioFormatSNorm8, HioFormatSNorm8Vec2, HioFormatSNorm8Vec3,
  HioFormatSNorm8Vec4, HioFormatFloat16, HioFormatFloat16Vec2, HioFormatFloat16Vec3,
  HioFormatFloat16Vec4, HioFormatFloat32, HioFormatFloat32Vec2, HioFormatFloat32Vec3,
  HioFormatFloat32Vec4, HioFormatDouble64, HioFormatDouble64Vec2, HioFormatDouble64Vec3,
  HioFormatDouble64Vec4, HioFormatUInt16, HioFormatUInt16Vec2, HioFormatUInt16Vec3,
  HioFormatUInt16Vec4, HioFormatInt16, HioFormatInt16Vec2, HioFormatInt16Vec3,
  HioFormatInt16Vec4, HioFormatUInt32, HioFormatUInt32Vec2, HioFormatUInt32Vec3,
  HioFormatUInt32Vec4, HioFormatInt32, HioFormatInt32Vec2, HioFormatInt32Vec3,
  HioFormatInt32Vec4, HioFormatUNorm8srgb, HioFormatUNorm8Vec2srgb, HioFormatUNorm8Vec3srgb,
  HioFormatUNorm8Vec4srgb, HioFormatBC6FloatVec3, HioFormatBC6UFloatVec3, HioFormatBC7UNorm8Vec4,
  HioFormatBC7UNorm8Vec4srgb, HioFormatBC1UNorm8Vec4, HioFormatBC3UNorm8Vec4, HioFormatCount
}
 
enum  HioAddressDimension { HioAddressDimensionU, HioAddressDimensionV, HioAddressDimensionW }
 
enum  HioAddressMode {
  HioAddressModeClampToEdge = 0, HioAddressModeMirrorClampToEdge, HioAddressModeRepeat, HioAddressModeMirrorRepeat,
  HioAddressModeClampToBorderColor
}
 
enum  HioType {
  HioTypeUnsignedByte, HioTypeUnsignedByteSRGB, HioTypeSignedByte, HioTypeUnsignedShort,
  HioTypeSignedShort, HioTypeUnsignedInt, HioTypeInt, HioTypeHalfFloat,
  HioTypeFloat, HioTypeDouble, HioTypeCount
}
 

Functions

HIO_API HioFormat HioGetFormat (uint32_t nchannels, HioType type, bool isSRGB)
 Returns the HioFormat of containing nChannels of HioType type. More...
 
HIO_API HioType HioGetHioType (HioFormat)
 Return the HioType corresponding to the given HioFormat. More...
 
HIO_API int HioGetComponentCount (HioFormat format)
 Return the count of components (channels) in the given HioFormat. More...
 
HIO_API size_t HioGetDataSizeOfType (HioFormat hioFormat)
 Return the size in bytes for a component (channel) in the given HioFormat. More...
 
HIO_API size_t HioGetDataSizeOfType (HioType type)
 Return the size in bytes for a component (channel) in the given HioType. More...
 
HIO_API size_t HioGetDataSizeOfFormat (HioFormat format, size_t *blockWidth=nullptr, size_t *blockHeight=nullptr)
 Returns the size of bytes per pixel for the given HioFormat. More...
 
HIO_API bool HioIsCompressed (HioFormat format)
 Return if the given format is compressed. More...
 
HIO_API size_t HioGetDataSize (const HioFormat hioFormat, const GfVec3i &dimensions)
 

Enumeration Type Documentation

Available texture sampling dimensions.

Enumerator
HioAddressDimensionU 
HioAddressDimensionV 
HioAddressDimensionW 

Definition at line 137 of file types.h.

Various modes used during sampling of a texture.

Enumerator
HioAddressModeClampToEdge 
HioAddressModeMirrorClampToEdge 
HioAddressModeRepeat 
HioAddressModeMirrorRepeat 
HioAddressModeClampToBorderColor 

Definition at line 148 of file types.h.

enum HioFormat

HioFormat describes the memory format of image buffers used in Hio.

For reference, see: https://www.khronos.org/registry/vulkan/specs/1.1/html/vkspec.html#VkFormat

Enumerator
HioFormatInvalid 
HioFormatUNorm8 
HioFormatUNorm8Vec2 
HioFormatUNorm8Vec3 
HioFormatUNorm8Vec4 
HioFormatSNorm8 
HioFormatSNorm8Vec2 
HioFormatSNorm8Vec3 
HioFormatSNorm8Vec4 
HioFormatFloat16 
HioFormatFloat16Vec2 
HioFormatFloat16Vec3 
HioFormatFloat16Vec4 
HioFormatFloat32 
HioFormatFloat32Vec2 
HioFormatFloat32Vec3 
HioFormatFloat32Vec4 
HioFormatDouble64 
HioFormatDouble64Vec2 
HioFormatDouble64Vec3 
HioFormatDouble64Vec4 
HioFormatUInt16 
HioFormatUInt16Vec2 
HioFormatUInt16Vec3 
HioFormatUInt16Vec4 
HioFormatInt16 
HioFormatInt16Vec2 
HioFormatInt16Vec3 
HioFormatInt16Vec4 
HioFormatUInt32 
HioFormatUInt32Vec2 
HioFormatUInt32Vec3 
HioFormatUInt32Vec4 
HioFormatInt32 
HioFormatInt32Vec2 
HioFormatInt32Vec3 
HioFormatInt32Vec4 
HioFormatUNorm8srgb 
HioFormatUNorm8Vec2srgb 
HioFormatUNorm8Vec3srgb 
HioFormatUNorm8Vec4srgb 
HioFormatBC6FloatVec3 
HioFormatBC6UFloatVec3 
HioFormatBC7UNorm8Vec4 
HioFormatBC7UNorm8Vec4srgb 
HioFormatBC1UNorm8Vec4 
HioFormatBC3UNorm8Vec4 
HioFormatCount 

Definition at line 42 of file types.h.

enum HioType
Enumerator
HioTypeUnsignedByte 
HioTypeUnsignedByteSRGB 
HioTypeSignedByte 
HioTypeUnsignedShort 
HioTypeSignedShort 
HioTypeUnsignedInt 
HioTypeInt 
HioTypeHalfFloat 
HioTypeFloat 
HioTypeDouble 
HioTypeCount 

Definition at line 161 of file types.h.

Function Documentation

HIO_API int HioGetComponentCount ( HioFormat  format)

Return the count of components (channels) in the given HioFormat.

HIO_API size_t HioGetDataSize ( const HioFormat  hioFormat,
const GfVec3i dimensions 
)

Calculate the byte size of texture. If compressed, takes block size into account.

HIO_API size_t HioGetDataSizeOfFormat ( HioFormat  format,
size_t *  blockWidth = nullptr,
size_t *  blockHeight = nullptr 
)

Returns the size of bytes per pixel for the given HioFormat.

HIO_API size_t HioGetDataSizeOfType ( HioFormat  hioFormat)

Return the size in bytes for a component (channel) in the given HioFormat.

HIO_API size_t HioGetDataSizeOfType ( HioType  type)

Return the size in bytes for a component (channel) in the given HioType.

HIO_API HioFormat HioGetFormat ( uint32_t  nchannels,
HioType  type,
bool  isSRGB 
)

Returns the HioFormat of containing nChannels of HioType type.

HIO_API HioType HioGetHioType ( HioFormat  )

Return the HioType corresponding to the given HioFormat.

HIO_API bool HioIsCompressed ( HioFormat  format)

Return if the given format is compressed.