|
| vkTexture (PlatformContext &context, const ResourceDescriptor< Texture > &descriptor) |
|
virtual | ~vkTexture () override |
|
bool | unload () override |
|
void | clearData (VkCommandBuffer cmdBuffer, const UColour4 &clearColour, SubRange layerRange, U8 mipLevel) const noexcept |
|
void | generateMipmaps (VkCommandBuffer cmdBuffer, U16 baseLevel, U16 baseLayer, U16 layerCount, ImageUsage crtUsage) |
|
| PROPERTY_R (AllocatedImage_uptr, image, nullptr) |
|
| PROPERTY_R_IW (VkImageType, vkType, VK_IMAGE_TYPE_MAX_ENUM) |
|
| PROPERTY_R_IW (VkFormat, vkFormat, VK_FORMAT_MAX_ENUM) |
|
| PROPERTY_R_IW (VkSampleCountFlagBits, sampleFlagBits, VK_SAMPLE_COUNT_1_BIT) |
|
ImageReadbackData | readData (U8 mipLevel, const PixelAlignment &pixelPackAlignment) const noexcept override |
|
ImageReadbackData | readData (VkCommandBuffer cmdBuffer, U8 mipLevel, const PixelAlignment &pixelPackAlignment) const noexcept |
|
VkImageView | getImageView (const CachedImageView::Descriptor &descriptor) const |
|
| Texture (PlatformContext &context, const ResourceDescriptor< Texture > &descriptor) |
|
virtual | ~Texture () override |
|
void | createWithData (const ImageTools::ImageData &imageData, const PixelAlignment &pixelUnpackAlignment) |
| API-dependent loading function that uploads ptr data to the GPU using the specified parameters.
|
|
void | createWithData (const Byte *data, size_t dataSize, const vec2< U16 > &dimensions, const PixelAlignment &pixelUnpackAlignment) |
|
void | createWithData (const Byte *data, size_t dataSize, const vec3< U16 > &dimensions, const PixelAlignment &pixelUnpackAlignment) |
|
void | replaceData (const Byte *data, size_t dataSize, const vec3< U16 > &offset, const vec3< U16 > &range, const PixelAlignment &pixelUnpackAlignment) |
|
void | setSampleCount (U8 newSampleCount) |
| Change the number of MSAA samples for this current texture.
|
|
ImageView | getView () const noexcept |
|
ImageView | getView (TextureType targetType) const noexcept |
|
ImageView | getView (SubRange mipRange) const noexcept |
|
ImageView | getView (SubRange mipRange, SubRange layerRange) const noexcept |
|
ImageView | getView (TextureType targetType, SubRange mipRange) const noexcept |
|
ImageView | getView (TextureType targetType, SubRange mipRange, SubRange layerRange) const noexcept |
|
virtual ImageReadbackData | readData (U8 mipLevel, const PixelAlignment &pixelPackAlignment) const =0 |
|
| PROPERTY_R (TextureDescriptor, descriptor) |
|
| PROPERTY_R (U16, mipCount, 1u) |
| Get the number of mips.
|
|
| PROPERTY_R (U16, width, 0u) |
| Texture width as returned by STB/DDS loader.
|
|
| PROPERTY_R (U16, height, 0u) |
| Texture height as returned by STB/DDS loader.
|
|
| PROPERTY_R (U16, depth, 1u) |
| Depth for TEXTURE_3D, layer count for TEXTURE_1/2D/CUBE_ARRAY. For cube arrays, numSlices = depth * 6u.
|
|
| PROPERTY_R (bool, hasTranslucency, false) |
| If the texture has an alpha channel and at least one pixel is translucent, return true.
|
|
| PROPERTY_R (bool, hasTransparency, false) |
| If the texture has an alpha channel and at least on pixel is fully transparent and no pixels are partially transparent, return true.
|
|
| PROPERTY_R (bool, loadedFromFile, false) |
|
U8 | numChannels () const noexcept |
|
bool | load (PlatformContext &context) override |
| Loading and unloading interface.
|
|
bool | postLoad () override |
|
| CachedResource (const ResourceDescriptorBase &descriptor, std::string_view typeName) |
|
virtual bool | load (PlatformContext &context) |
| Loading and unloading interface.
|
|
virtual bool | postLoad () |
|
virtual bool | unload () |
|
void | setState (ResourceState currentState) final |
|
| Resource (std::string_view resourceName, std::string_view typeName) |
|
ResourceState | getState () const noexcept |
|
| PROPERTY_R (Str< 32 >, typeName) |
|
| PROPERTY_R (Str< 256 >, resourceName) |
|
| GUIDWrapper () noexcept |
|
| GUIDWrapper (const GUIDWrapper &old) noexcept |
|
| GUIDWrapper (GUIDWrapper &&old) noexcept |
|
virtual | ~GUIDWrapper ()=default |
|
FORCE_INLINE I64 | getGUID () const noexcept |
|
GUIDWrapper & | operator= (const GUIDWrapper &old)=delete |
|
GUIDWrapper & | operator= (GUIDWrapper &&other)=delete |
|
virtual | ~GraphicsResource () |
|
GFXDevice & | context () const noexcept |
|
U64 | nameHash () const noexcept |
|
| NonCopyable (const NonCopyable &)=delete |
|
NonCopyable & | operator= (const NonCopyable &)=delete |
|
| NonCopyable (NonCopyable &&)=default |
|
NonCopyable & | operator= (NonCopyable &&)=default |
|
| NonMovable (NonMovable &&)=delete |
|
NonMovable & | operator= (NonMovable &&)=delete |
|
| NonMovable (const NonMovable &)=default |
|
NonMovable & | operator= (const NonMovable &)=default |
|
|
bool | loadFile (const ResourcePath &path, std::string_view name, ImageTools::ImageData &fileData) |
| Use STB to load a file into a Texture Object.
|
|
bool | checkTransparency (const ResourcePath &path, std::string_view name, ImageTools::ImageData &fileData) |
|
bool | loadInternal () |
| Load texture data using the specified file name.
|
|
void | validateDescriptor () |
|
virtual void | loadDataInternal (const ImageTools::ImageData &imageData, const vec3< U16 > &offset, const PixelAlignment &pixelUnpackAlignment)=0 |
|
virtual void | loadDataInternal (const Byte *data, size_t size, U8 targetMip, const vec3< U16 > &offset, const vec3< U16 > &dimensions, const PixelAlignment &pixelUnpackAlignment)=0 |
|
virtual void | prepareTextureData (U16 width, U16 height, U16 depth, bool emptyAllocation) |
|
virtual void | submitTextureData () |
|
| PROPERTY_RW (ResourcePath, assetLocation) |
|
| PROPERTY_RW (Str< 256 >, assetName) |
|
| PROPERTY_R (size_t, descriptorHash) |
|
virtual void | setState (ResourceState currentState) |
|
| GraphicsResource (GFXDevice &context, Type type, I64 GUID, U64 nameHash) |
|
| NonCopyable ()=default |
|
| ~NonCopyable ()=default |
|
| NonMovable ()=default |
|
| ~NonMovable ()=default |
|
Mutex | _callbackLock {} |
|
std::atomic< ResourceState > | _resourceState |
|
const I64 | _guid |
|
GFXDevice & | _context |
|
static bool | s_useDDSCache = true |
|
static SamplerDescriptor | s_defaultSampler |
|
static Handle< Texture > | s_defaultTexture2D = INVALID_HANDLE<Texture> |
|
static Handle< Texture > | s_defaultTexture2DArray = INVALID_HANDLE<Texture> |
|
static Str< 64 > | s_missingTextureFileName |
|
Definition at line 53 of file vkTexture.h.