![]() |
CMSC23740 Common Code Library
Support code for CS23740 programming projects
|
#include <texture.hpp>


Public Member Functions | |
| vk::ImageView | view () const |
| return the image view for the texture | |
| vk::Format | format () const |
| get the texel format | |
Protected Member Functions | |
| TextureBase (Application *app, uint32_t wid, uint32_t ht, uint32_t mipLvls, cs237::__detail::ImageBase const *img) | |
| ~TextureBase () | |
| vk::Buffer | _createBuffer (size_t size, vk::BufferUsageFlags usage) |
| create a vk::Buffer object | |
| vk::DeviceMemory | _allocBufferMemory (vk::Buffer buf, vk::MemoryPropertyFlags props) |
| A helper function for allocating and binding device memory for a buffer. | |
| void | _init (cs237::__detail::ImageBase const *img) |
| initialize a texture by copying data into it using a staging buffer. | |
Protected Attributes | |
| Application * | _app |
| the owning application | |
| vk::Image | _img |
| Vulkan image to hold the texture. | |
| vk::DeviceMemory | _mem |
| device memory for the texture image | |
| vk::ImageView | _view |
| image view for texture image | |
| uint32_t | _wid |
| texture width | |
| uint32_t | _ht |
| teture height (1 for 1D textures) | |
| uint32_t | _nMipLevels |
| number of mipmap levels | |
| vk::Format | _fmt |
| the texel format | |
|
protected |
|
protected |
|
inlineprotected |
A helper function for allocating and binding device memory for a buffer.
| buf | the buffer to allocate memory for |
| props | requred memory properties |
|
inlineprotected |
create a vk::Buffer object
| size | the size of the buffer in bytes |
| usage | the usage of the buffer |
|
protected |
initialize a texture by copying data into it using a staging buffer.
| img | the source of the data |
|
inline |
get the texel format
|
inline |
return the image view for the texture
|
protected |
the owning application
|
protected |
the texel format
|
protected |
teture height (1 for 1D textures)
|
protected |
Vulkan image to hold the texture.
|
protected |
device memory for the texture image
|
protected |
number of mipmap levels
|
protected |
image view for texture image
|
protected |
texture width