Vookoo
Public Member Functions | List of all members
vku::TextureImageCube Class Reference

A cube map texture image living on the GPU or a staging buffer visible to the CPU. More...

#include <vku.hpp>

Inheritance diagram for vku::TextureImageCube:
vku::GenericImage

Public Member Functions

 TextureImageCube (vk::Device device, const vk::PhysicalDeviceMemoryProperties &memprops, uint32_t width, uint32_t height, uint32_t mipLevels=1, vk::Format format=vk::Format::eR8G8B8A8Unorm, bool hostImage=false)
 
- Public Member Functions inherited from vku::GenericImage
 GenericImage (vk::Device device, const vk::PhysicalDeviceMemoryProperties &memprops, const vk::ImageCreateInfo &info, vk::ImageViewType viewType, vk::ImageAspectFlags aspectMask, bool makeHostImage)
 
vk::Image image () const
 
vk::ImageView imageView () const
 
vk::DeviceMemory mem () const
 
void clear (vk::CommandBuffer cb, const std::array< float, 4 > colour={1, 1, 1, 1})
 Clear the colour of an image.
 
void update (vk::Device device, const void *data, vk::DeviceSize bytesPerPixel)
 Update the image with an array of pixels. (Currently 2D only)
 
void copy (vk::CommandBuffer cb, vku::GenericImage &srcImage)
 Copy another image to this one. This also changes the layout.
 
void copy (vk::CommandBuffer cb, vk::Buffer buffer, uint32_t mipLevel, uint32_t arrayLayer, uint32_t width, uint32_t height, uint32_t depth, uint32_t offset)
 Copy a subimage in a buffer to this image.
 
void upload (vk::Device device, std::vector< uint8_t > &bytes, vk::CommandPool commandPool, vk::PhysicalDeviceMemoryProperties memprops, vk::Queue queue)
 
void setLayout (vk::CommandBuffer cb, vk::ImageLayout newLayout, vk::ImageAspectFlags aspectMask=vk::ImageAspectFlagBits::eColor)
 Change the layout of this image using a memory barrier.
 
void setCurrentLayout (vk::ImageLayout oldLayout)
 Set what the image thinks is its current layout (ie. the old layout in an image barrier).
 
vk::Format format () const
 
vk::Extent3D extent () const
 
const vk::ImageCreateInfo & info () const
 

Additional Inherited Members

- Protected Member Functions inherited from vku::GenericImage
void create (vk::Device device, const vk::PhysicalDeviceMemoryProperties &memprops, const vk::ImageCreateInfo &info, vk::ImageViewType viewType, vk::ImageAspectFlags aspectMask, bool hostImage)
 
- Protected Attributes inherited from vku::GenericImage
State s
 

Detailed Description

A cube map texture image living on the GPU or a staging buffer visible to the CPU.


The documentation for this class was generated from the following file: