SimpleGL
1.1.0
A framework for platform independent rendering
|
This class wraps a Vulkan texture image. More...
#include <texture_image.hpp>
Public Member Functions | |
TextureImage (uint32_t width, uint32_t height) | |
Creates a new texture image. More... | |
~TextureImage (void) | |
Destroys the texture image. More... | |
VkImage | getHandle () |
Returns the handle of the texture image. More... | |
VkImageView | getImageView () |
Returns the image view of the texture image. More... | |
VkSampler | getSampler () |
Returns the texture sampler of the image. More... | |
uint32_t | getWidth () |
Returns the width of the texture image. More... | |
uint32_t | getHeight () |
Returns the height of the texture image. More... | |
void | upload (std::vector< uint8_t > data) |
Uploads data to the texture image. More... | |
Static Public Member Functions | |
static TextureImage * | getCurrent () |
Returns the currently used texture image. More... | |
static void | setCurrent (TextureImage *current) |
Sets the currently used texture image. More... | |
This class wraps a Vulkan texture image.
Definition at line 24 of file texture_image.hpp.
sgl::TextureImage::TextureImage | ( | uint32_t | width, |
uint32_t | height | ||
) |
Creates a new texture image.
width | The width of the image. |
height | The height of the image. |
Definition at line 33 of file texture_image.cpp.
sgl::TextureImage::~TextureImage | ( | void | ) |
Destroys the texture image.
Definition at line 94 of file texture_image.cpp.
|
static |
Returns the currently used texture image.
Definition at line 22 of file texture_image.cpp.
VkImage sgl::TextureImage::getHandle | ( | ) |
Returns the handle of the texture image.
Definition at line 109 of file texture_image.cpp.
uint32_t sgl::TextureImage::getHeight | ( | ) |
Returns the height of the texture image.
Definition at line 125 of file texture_image.cpp.
VkImageView sgl::TextureImage::getImageView | ( | ) |
Returns the image view of the texture image.
Definition at line 113 of file texture_image.cpp.
VkSampler sgl::TextureImage::getSampler | ( | ) |
Returns the texture sampler of the image.
Definition at line 117 of file texture_image.cpp.
uint32_t sgl::TextureImage::getWidth | ( | ) |
Returns the width of the texture image.
Definition at line 121 of file texture_image.cpp.
|
static |
Sets the currently used texture image.
current | The texture image to set. |
Definition at line 26 of file texture_image.cpp.
void sgl::TextureImage::upload | ( | std::vector< uint8_t > | data | ) |
Uploads data to the texture image.
data | The data to upload. |
Definition at line 129 of file texture_image.cpp.