![]() |
CMSC23700 Common Code Library
Support code for CS23700 programming projects
|
#include <cs237-texture.hpp>


Public Member Functions | |
| Texture2D (Application *app, Image2D const *img, bool mipmap=false) | |
| Construct a 2D texture from a 2D image. | |
Public Member Functions inherited from cs237::__detail::TextureBase | |
| vk::ImageView | view () const |
| return the image view for the texture | |
| vk::Format | format () const |
| get the texel format | |
Additional Inherited Members | |
Protected Member Functions inherited from cs237::__detail::TextureBase | |
| 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 inherited from cs237::__detail::TextureBase | |
| 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 | |
| cs237::Texture2D::Texture2D | ( | Application * | app, |
| Image2D const * | img, | ||
| bool | mipmap = false |
||
| ) |
Construct a 2D texture from a 2D image.
| app | the owning application |
| img | the source image for the texture |
| mipmap | if true, generate mipmap levels for the texture. |