15 #include <vsg/state/ImageView.h>
16 #include <vsg/state/Sampler.h>
26 imageLayout(VK_IMAGE_LAYOUT_UNDEFINED) {}
33 ImageInfo(in_sampler, ImageView::create(Image::create(in_data)), in_imageLayout)
40 explicit operator bool()
const {
return sampler.valid() && imageView.valid(); }
44 void computeNumMipMapLevels();
48 VkImageLayout imageLayout = VK_IMAGE_LAYOUT_UNDEFINED;
53 if (!imageView || !imageView->image)
return false;
54 auto& data = imageView->image->data;
55 return data && data->differentModifiedCount(copiedModifiedCounts[deviceID]);
61 if (!imageView || !imageView->image)
return false;
62 auto& data = imageView->image->data;
63 return data && data->getModifiedCount(copiedModifiedCounts[deviceID]);
73 using ImageInfoList = std::vector<ref_ptr<ImageInfo>>;
79 int numBitsPerComponent = 0;
80 int numComponents = 0;
85 uint8_t defaultValue[32];
90 T* ptr =
reinterpret_cast<T*
>(defaultValue);
99 extern VSG_DECLSPEC
FormatTraits getFormatTraits(VkFormat format,
bool default_one =
true);
102 extern VSG_DECLSPEC uint32_t computeNumMipMapLevels(
const Data* data,
const Sampler* sampler);
ImageInfo class provides the VkDescriptorImageInfo settings used when setting up vsg::/vkDescriptorIm...
Definition: ImageInfo.h:23
int compare(const Object &rhs_object) const override
compare two objects, return -1 if this object is less than rhs, return 0 if it's equal,...
bool syncModifiedCounts(uint32_t deviceID)
return true if the ImageInfo's data has been modified and should be copied to the buffer,...
Definition: ImageInfo.h:59
bool requiresCopy(uint32_t deviceID) const
return true if the ImageInfo's data has been modified and should be copied to the buffer
Definition: ImageInfo.h:51
Sampler encapsulates the VkSampler and the VkSamplerCreateInfo settings used to set it up.
Definition: Sampler.h:25
vk_buffer that manages a single logical device supported.
Definition: vk_buffer.h:28