SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | Static Public Member Functions | List of all members
sgl::TextureImage Class Reference

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 TextureImagegetCurrent ()
 Returns the currently used texture image. More...
 
static void setCurrent (TextureImage *current)
 Sets the currently used texture image. More...
 

Detailed Description

This class wraps a Vulkan texture image.

Definition at line 24 of file texture_image.hpp.

Constructor & Destructor Documentation

sgl::TextureImage::TextureImage ( uint32_t  width,
uint32_t  height 
)

Creates a new texture image.

Parameters
widthThe width of the image.
heightThe 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.

Member Function Documentation

TextureImage * sgl::TextureImage::getCurrent ( )
static

Returns the currently used texture image.

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.

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.

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.

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.

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.

Returns
The width of the texture image.

Definition at line 121 of file texture_image.cpp.

void sgl::TextureImage::setCurrent ( TextureImage current)
static

Sets the currently used texture image.

Parameters
currentThe 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.

Parameters
dataThe data to upload.

Definition at line 129 of file texture_image.cpp.


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