14#ifndef _CS237_TEXTURE_HPP_
15#define _CS237_TEXTURE_HPP_
Definition cs237-image.hpp:58
Definition cs237-texture.hpp:21
vk::Format format() const
get the texel format
Definition cs237-texture.hpp:27
vk::DeviceMemory _allocBufferMemory(vk::Buffer buf, vk::MemoryPropertyFlags props)
A helper function for allocating and binding device memory for a buffer.
Definition cs237-texture.hpp:58
uint32_t _ht
teture height (1 for 1D textures)
Definition cs237-texture.hpp:35
void _init(cs237::__detail::ImageBase const *img)
initialize a texture by copying data into it using a staging buffer.
vk::ImageView _view
image view for texture image
Definition cs237-texture.hpp:33
uint32_t _wid
texture width
Definition cs237-texture.hpp:34
Application * _app
the owning application
Definition cs237-texture.hpp:30
vk::Buffer _createBuffer(size_t size, vk::BufferUsageFlags usage)
create a vk::Buffer object
Definition cs237-texture.hpp:49
uint32_t _nMipLevels
number of mipmap levels
Definition cs237-texture.hpp:36
vk::ImageView view() const
return the image view for the texture
Definition cs237-texture.hpp:24
vk::Image _img
Vulkan image to hold the texture.
Definition cs237-texture.hpp:31
vk::DeviceMemory _mem
device memory for the texture image
Definition cs237-texture.hpp:32
TextureBase(Application *app, uint32_t wid, uint32_t ht, uint32_t mipLvls, cs237::__detail::ImageBase const *img)
vk::Format _fmt
the texel format
Definition cs237-texture.hpp:37
the base class for applications
Definition cs237-application.hpp:25
vk::DeviceMemory _allocBufferMemory(vk::Buffer buf, vk::MemoryPropertyFlags props)
A helper function for allocating and binding device memory for a buffer.
vk::Buffer _createBuffer(size_t size, vk::BufferUsageFlags usage)
create a vk::Buffer object
Definition cs237-image.hpp:112
Definition cs237-image.hpp:139
Definition cs237-texture.hpp:72
Texture1D(Application *app, Image1D const *img)
Construct a 1D texture from a 1D image.
Definition cs237-texture.hpp:83
Texture2D(Application *app, Image2D const *img, bool mipmap=false)
Construct a 2D texture from a 2D image.
Definition cs237-aabb.hpp:22
Axis-Aligned Bounding Box parameterized over the scalar type.
Definition cs237-aabb.hpp:28