Axmol 3.0.0-89d6d9a
Loading...
Searching...
No Matches
TextureImpl Class Reference

The texture implementation supports 2D, cubemap, and 2D array textures. More...

#include <TextureVK.h>

Inherits Texture.

Public Member Functions

 TextureImpl (GraphicsDeviceImpl *, const TextureDesc &desc)
void updateData (const void *data, int width, int height, int level, int layerIndex=0) override
 Update a two-dimensional texture image.
void updateCompressedData (const void *data, int width, int height, size_t dataSize, int level, int layerIndex=0) override
 Update a two-dimensional texture image in a compressed format.
void updateSubData (int xoffset, int yoffset, int width, int height, int level, const void *data, int layerIndex=0) override
 Update a two-dimensional texture subimage.
void updateCompressedSubData (int xoffset, int yoffset, int width, int height, size_t dataSize, int level, const void *data, int layerIndex=0) override
 Update a two-dimensional texture subimage in a compressed format.
void updateFaceData (TextureCubeFace side, const void *data) override
 Update texutre cube data in give slice side.
void updateSamplerDesc (const SamplerDesc &sampler) override
 Update sampler.
void updateTextureDesc (const TextureDesc &desc) override
 Update texture description.
 TextureImpl (GraphicsDeviceImpl *, VkImage existingImage, VkImageView existingImageView, VkImageUsageFlags usage)
 Wraps an existing VkImage (e.g.
Public Member Functions inherited from Texture
PixelFormat getPixelFormat () const
 Get texture format.
TextureUsage getTextureUsage () const
 Get texture usage.
TextureType getTextureType () const
 Get texture type.
bool hasMipmaps () const
 Check if mipmap had generated before.
void zeroTexData ()
 clear texture data to zero.
Public Member Functions inherited from Object
void retain ()
 Retains the ownership.
void release ()
 Releases the ownership immediately.
Object * autorelease ()
 Releases the ownership sometime soon automatically.
unsigned int getReferenceCount () const
 Returns the Object's current reference count.
uint64_t getObjectID () const noexcept
 Returns the process-local diagnostic identifier assigned at construction.
virtual ~Object ()
 Destructor.

Detailed Description

The texture implementation supports 2D, cubemap, and 2D array textures.

Constructor & Destructor Documentation

◆ TextureImpl() [1/2]

TextureImpl ( GraphicsDeviceImpl * ,
const TextureDesc & desc )
Parameters
descSpecifies the texture description.

◆ TextureImpl() [2/2]

TextureImpl ( GraphicsDeviceImpl * ,
VkImage existingImage,
VkImageView existingImageView,
VkImageUsageFlags usage )

Wraps an existing VkImage (e.g.

from OpenXR swapchain).

Member Function Documentation

◆ updateData()

void updateData ( const void * data,
int width,
int height,
int level,
int layerIndex = 0 )
overridevirtual

Update a two-dimensional texture image.

Parameters
dataSpecifies a pointer to the image data in memory.
widthSpecifies the width of the texture image.
heightSpecifies the height of the texture image.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
layerIndexSpecifies the layer index for 2D array textures.

Implements Texture.

◆ updateCompressedData()

void updateCompressedData ( const void * data,
int width,
int height,
size_t dataSize,
int level,
int layerIndex = 0 )
overridevirtual

Update a two-dimensional texture image in a compressed format.

Parameters
dataSpecifies a pointer to the compressed image data in memory.
widthSpecifies the width of the texture image.
heightSpecifies the height of the texture image.
dataSizeSpecifies the totoal size of compressed image in bytes.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
layerIndexSpecifies the layer index for 2D array textures.

Implements Texture.

◆ updateSubData()

void updateSubData ( int xoffset,
int yoffset,
int width,
int height,
int level,
const void * data,
int layerIndex = 0 )
overridevirtual

Update a two-dimensional texture subimage.

Parameters
xoffsetSpecifies a texel offset in the x direction within the texture array.
yoffsetSpecifies a texel offset in the y direction within the texture array.
widthSpecifies the width of the texture subimage.
heightSpecifies the height of the texture subimage.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
dataSpecifies a pointer to the image data in memory.
layerIndexSpecifies the layer index for 2D array textures.

Implements Texture.

◆ updateCompressedSubData()

void updateCompressedSubData ( int xoffset,
int yoffset,
int width,
int height,
size_t dataSize,
int level,
const void * data,
int layerIndex = 0 )
overridevirtual

Update a two-dimensional texture subimage in a compressed format.

Parameters
xoffsetSpecifies a texel offset in the x direction within the texture array.
yoffsetSpecifies a texel offset in the y direction within the texture array.
widthSpecifies the width of the texture subimage.
heightSpecifies the height of the texture subimage.
dataSizeSpecifies the totoal size of compressed subimage in bytes.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
dataSpecifies a pointer to the compressed image data in memory.
layerIndexSpecifies the layer index for 2D array textures.

Implements Texture.

◆ updateFaceData()

void updateFaceData ( TextureCubeFace side,
const void * data )
overridevirtual

Update texutre cube data in give slice side.

Parameters
sideSpecifies which slice texture of cube to be update.
dataSpecifies a pointer to the image data in memory.

Implements Texture.

◆ updateSamplerDesc()

void updateSamplerDesc ( const SamplerDesc & desc)
overridevirtual

Update sampler.

Parameters
samplerSpecifies the sampler descriptor.

Implements Texture.

◆ updateTextureDesc()

void updateTextureDesc ( const TextureDesc & desc)
overridevirtual

Update texture description.

Parameters
descriptorSpecifies texture and sampler descriptor.

Reimplemented from Texture.


The documentation for this class was generated from the following file:
  • TextureVK.h