All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
kanzi::Texture Class Reference

Textures provide images that can be read from shaders through samplers. More...

#include <kanzi/graphics_3d/texture.hpp>

Inheritance diagram for kanzi::Texture:
kanzi::Surface kanzi::GPUResource kanzi::Resource kanzi::Object

Public Types

enum  CreateFlag {
  CreateFlagMipmapsNearest, CreateFlagMipmapsLinear, CreateFlagImages, CreateFlagNearestFilter,
  CreateFlagClampAddress
}
 
enum  ImageTarget {
  ImageTargetInvalid, ImageTargetTwoDimensional, ImageTargetTwoDimensionalArray, ImageTargetTwoDimensionalMultisample,
  ImageTargetTwoDimensionalMultisampleArray, ImageTargetThreeDimensional, ImageTargetCubeMapPositiveX, ImageTargetCubeMapNegativeX,
  ImageTargetCubeMapPositiveY, ImageTargetCubeMapNegativeY, ImageTargetCubeMapPositiveZ, ImageTargetCubeMapNegativeZ,
  ImageTargetExternal
}
 
enum  Target {
  TargetInvalid, TargetTwoDimensional, TargetTwoDimensionalArray, TargetTwoDimensionalMultisample,
  TargetTwoDimensionalMultisampleArray, TargetThreeDimensional, TargetCubeMap, TargetCubeMapArray,
  TargetExternal
}
 
- Public Types inherited from kanzi::Surface
enum  APIAttachment {
  APIAttachmentColor0, APIAttachmentColor1, APIAttachmentColor2, APIAttachmentColor3,
  APIAttachmentDepth, APIAttachmentStencil, APIAttachmentInvalid
}
 

Public Member Functions

 Texture (Domain *domain, string_view name="")
 
virtual ~Texture () KZ_OVERRIDE
 
SamplerSharedPtr getSampler () const
 Returns the Sampler used by the texture. More...
 
Target getTarget () const
 Returns the texture target used by the texture. More...
 
void generateMipmaps ()
 Generates the mipmaps from the base level image. More...
 
void setData (unsigned int face, unsigned int mipLevel, unsigned int x, unsigned int y, unsigned int width, unsigned int height, const kzByte *data) const
 Sets the texture data for the specified area in the texture. More...
 
void setData (unsigned int mipLevel, const kzByte *data) const
 Sets the texture data for one mip level of a non-cubemap texture. More...
 
void bind ()
 Prepares a texture for use by the renderer. More...
 
void unbind ()
 
KzcImagegetImage (unsigned int face, unsigned int slice) const
 Returns the CPU accessible copy of the texture data. More...
 
bool hasImages () const
 Returns true if the texture maintains the CPU accessible copy of the texture data. More...
 
unsigned int getGLHandle () const
 Returns the GL API object handle of the framebuffer. More...
 
bool isSupportedByRenderer () const
 
virtual void attach (Framebuffer &framebuffer, Surface::APIAttachment apiAttachment, unsigned int face, unsigned int mipLevel) KZ_OVERRIDE
 
virtual bool isRenderable (unsigned int face, unsigned int mipLevel) const KZ_OVERRIDE
 
- Public Member Functions inherited from kanzi::Surface
GraphicsFormat getFormat () const
 Get GraphicsFormat of Surface. More...
 
unsigned int getSampleCount () const
 Get number multisample samples. 0 means multisampling is disabled. More...
 
unsigned int getWidth () const
 Get width in pixels. More...
 
unsigned int getHeight () const
 Get height in pixels. More...
 
unsigned int getSliceCount () const
 Get number of slices. More...
 
unsigned int getFaceCount () const
 Get number of faces. This should be six for cubemaps and one for everything else. More...
 
unsigned int getMipLevelCount () const
 Get number of mipmap levels. More...
 
bool isWellFormed () const
 Return true if Surface is valid shape and format. More...
 
virtual ~Surface () KZ_OVERRIDE
 
- Public Member Functions inherited from kanzi::GPUResource
virtual ~GPUResource () KZ_OVERRIDE
 
void deploy ()
 Make graphics API object(s) in the resource usable by preparing GPU objects and data in them. More...
 
void undeploy ()
 Free the GPU objects. After this, the resource is not usable for graphics API until deploy() is called again. More...
 
void invalidate ()
 Notify resource that graphics context was lost and all GPU resources are invalid. More...
 
unsigned int getGPUMemoryUsage () const
 
RenderergetRenderer () const
 
bool getDeployOnLoad () const
 Returns true if GPUResource is automatically deployed when loaded. More...
 
void setDeployOnLoad (bool value)
 Sets GPUResource automatic deployment on loade on or orr. More...
 
bool isDeployed () const
 
void deployed ()
 
void undeployed ()
 
virtual void finishLoadingOverride (const KzuResourceLoaderThreadContext *threadContext) KZ_OVERRIDE
 Function for finishing the loading of the resource. More...
 
- Public Member Functions inherited from kanzi::Resource
KzcMemoryManagergetMemoryManager () const
 
 Resource (Domain *domain, string_view name)
 
virtual ~Resource ()
 
void setKZB (const KzuBinaryDirectory *binaryDirectory, kzString path)
 
void setLoaded ()
 
kzString getName () const
 Accessor. More...
 
void load ()
 
void unload ()
 
bool isLoaded () const
 
void kzuResourceLoad_private (const KzuResourceLoaderThreadContext *threadContext)
 Private function for kzuResourceLoad() with specified thread context. More...
 
void kzuResourceFinishLoading_private (const KzuResourceLoaderThreadContext *threadContext)
 Private function for finishing the loading of the resource. More...
 
KzuResourceLoadingStrategy getLoadingStrategy () const
 
void setLoadingStrategy (KzuResourceLoadingStrategy loadingStrategy)
 
bool getKeepAlive () const
 Tells if the resource has keep alive flag set. More...
 
void setKeepAlive (bool keepAlive)
 Sets the keep alive flag. More...
 
- Public Member Functions inherited from kanzi::Object
 Object (Domain *domain)
 
virtual ~Object ()
 
DomaingetDomain () const
 Returns the domain the object belongs to. More...
 
KzuPropertyManager * getPropertyManager () const
 Returns the property manager of the object. More...
 
KzuTaskSchedulergetTaskScheduler () const
 Returns the task scheduler of the object. More...
 
KzuMessageDispatchergetMessageDispatcher () const
 Returns the message dispatcher of the object. More...
 
ResourceManagergetResourceManager () const
 Returns the resource manager of the object. More...
 
virtual const MetaclassgetDynamicMetaclass () const
 Returns the metaclass of the dynamic type of the object. More...
 
bool isTypeOf (const Metaclass *objectType) const
 Determines if the type of this object is the given type or derived from it. More...
 
template<typename DataType >
void setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::DataType value)
 Sets the local value of a property. More...
 
void setProperty (const PropertyType< ResourceID > &propertyType, ResourceSharedPtr value)
 Sets the local value of a resource id property with a resource pointer. More...
 
template<typename DataType >
DataType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property. More...
 
template<typename DataType >
bool getProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::DataType &value) const
 Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value. More...
 
template<typename DataType >
void setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::DataType value)
 
void setAbstractProperty (AbstractPropertyType abstractPropertyType, ResourceSharedPtr value)
 
template<typename DataType >
DataType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
bool getAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::DataType &value) const
 
bool hasValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value. More...
 
bool hasLocalValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a local value set for the property. More...
 
void removeLocalValue (AbstractPropertyType propertyType)
 Removes the local value associated with the property. More...
 
void copyLocalValues (const Object &other)
 Copies all local values from another object. More...
 
virtual void onPropertyChanged (AbstractPropertyType propertyType, KzuPropertyNotificationReason reason)
 Virtual function to handle property change notifications. More...
 
AppliedStyleEntryapplyObjectStyle (kanzi::StyleSharedPtr style)
 Applies a style to an object. More...
 
void unapplyObjectStyle (AppliedStyleEntry *appliedStyleEntry)
 
void applyObjectStyles ()
 Apply all styles for an object node. More...
 
void unapplyObjectStyles ()
 Unapplies and removes all applied styles. More...
 

Static Public Member Functions

static TextureSharedPtr create (Domain *domain, unsigned int width, unsigned int height, GraphicsFormat format, unsigned int flags, string_view name="")
 Creates a 2D texture with a specified shape and format. More...
 
static TextureSharedPtr create (Domain *domain, vector< KzcImage * > const &sourceImages, unsigned int flags, string_view name="")
 Creates a texture with a specified source images. More...
 
static TextureSharedPtr create (Domain *domain, KzcImage *sourceImage, unsigned int flags, string_view name="")
 Creates a texture with a specified source image. More...
 
static TextureSharedPtr create (Domain *domain, Target target, unsigned int width, unsigned int height, unsigned int depth, GraphicsFormat format, unsigned int sampleCount, unsigned int mipmapLevelCount, Sampler::MipmapMode mipmapMode, float mipLodBias, float minLod, float maxLod, Sampler::Filter minificationFilter, Sampler::Filter magnificationFilter, Sampler::AddressingMode addressingMode, float anisotropy, bool createImages, string_view name="")
 Creates a texture with a specified target, shape, format and sampler settings. More...
 
static bool areImagesValid (Renderer *renderer, const vector< KzcImage * > &images, Texture::Target target, Sampler::MipmapMode mipmapMode, GraphicsFormat &out_commonFormat, unsigned int &out_commonWidth, unsigned int &out_commonHeight, unsigned int &out_mipLevelCount)
 
- Static Public Member Functions inherited from kanzi::Object
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class. More...
 
static
PropertyTypeEditorInfoSharedPtr 
makeEditorInfo ()
 Default implementation that returns empty editor info. More...
 

Protected Member Functions

void initialize (Target target, GraphicsFormat format, unsigned int sampleCount, unsigned int width, unsigned int height, bool mipmaps, bool createImages)
 Sets the texture target, format, number of samples, dimensions, and whether mipmaps are used and images are created. More...
 
void initialize (Target target, vector< KzcImage * > const &sourceImages, unsigned int createFlags)
 Initializes the texture format, shape, and data from the specified source images. More...
 
void initialize (Target target, KzcImage *image, unsigned int createFlags)
 Initializes the texture format, shape, and data from the specified source image. More...
 
void initialize (Target target, int glHandle)
 Prepare texture from pre-existing GL texture object. More...
 
void samplerChanged ()
 
void applySampler ()
 
void applyFlags (unsigned int flags)
 
virtual void loadFromKZB (const KzuResourceLoaderThreadContext *threadContext, KzcInputStream *inputStream, const KzuBinaryFileInfo *file)
 Function for loading the resource from .KZB. More...
 
virtual unsigned int getCPUMemoryUsage () const KZ_OVERRIDE
 Function for getting the memory usage of a resource. More...
 
virtual void unloadOverride () KZ_OVERRIDE
 Unload function for resource. More...
 
virtual void invalidateOverride () KZ_OVERRIDE
 Notify resource that graphics context was lost and all GPU resources are invalid. Called by invalidate() More...
 
virtual void deployOverride () KZ_OVERRIDE
 Make graphics API object(s) in the resource usable by preparing GPU objects and data in them. Called by deploy() More...
 
virtual void undeployOverride () KZ_OVERRIDE
 Free the GPU objects. After this, the resource is not usable for graphics API until deploy() is called again. Called by undeploy() More...
 
virtual void freeCommonData () KZ_OVERRIDE
 Notify resource that graphics context was lost and all GPU resources are invalid. More...
 
virtual unsigned int getGPUMemoryUsageOverride () const KZ_OVERRIDE
 
- Protected Member Functions inherited from kanzi::Surface
 Surface (Domain *domain, string_view name="")
 
unsigned int getGpuMemoryUsageEstimate () const
 
void configure (GraphicsFormat format, unsigned int sampleCount, unsigned int width, unsigned int height, unsigned int sliceCount, unsigned int faceCount, unsigned int mipLevelCount)
 Set format and shape for the Surface. More...
 
void setFaceCount (unsigned int value)
 
void setSliceCount (unsigned int value)
 
- Protected Member Functions inherited from kanzi::GPUResource
 GPUResource (Domain *domain, string_view name="")
 
- Protected Member Functions inherited from kanzi::Resource
KzuResourceLoadState getLoadState ()
 Access. More...
 
- Protected Member Functions inherited from kanzi::Object
void initialize ()
 
void onCopy (const Object &other)
 

Static Protected Member Functions

static TextureSharedPtr createEmpty (Domain *domain, string_view name="")
 Creates a texture without specifying the format or shape (also known as empty texture). More...
 

Friends

class ResourceManager
 
class Sampler
 
class Framebuffer
 

Additional Inherited Members

- Protected Types inherited from kanzi::Object
typedef vector
< AppliedStyleEntry * > 
AppliedStyleContainer
 Applied style container. More...
 
- Protected Attributes inherited from kanzi::Object
AppliedStyleContainer m_appliedStyles
 Listing of applied styles applied to this object. More...
 

Detailed Description

Textures provide images that can be read from shaders through samplers.

Some textures can also be rendered to by attaching them to framebuffer as color or depth/stencil images.

Member Enumeration Documentation

Enumerator
CreateFlagMipmapsNearest 

Create a texture that uses the nearest mipmap mode. If this flag is missing, the texture uses the base mipmap mode.

CreateFlagMipmapsLinear 

Create a texture that uses the linear mipmap mode. If this flag is missing, the texture uses the base mipmap mode.

CreateFlagImages 

Allocate the CPU accessible memory for a copy of the texture data.

CreateFlagNearestFilter 

Use the nearest texture minification and maginification filtering. If this flag is missing, the texture uses linear minification and magnification filtering.

CreateFlagClampAddress 

Use the clamp texture addressing mode. If this flag is missing, the texture uses repeat texture addressing mode.

Enumerator
ImageTargetInvalid 
ImageTargetTwoDimensional 
ImageTargetTwoDimensionalArray 
ImageTargetTwoDimensionalMultisample 
ImageTargetTwoDimensionalMultisampleArray 
ImageTargetThreeDimensional 
ImageTargetCubeMapPositiveX 

Cube map positive x target type.

ImageTargetCubeMapNegativeX 

Cube map negative x target type.

ImageTargetCubeMapPositiveY 

Cube map positive y target type.

ImageTargetCubeMapNegativeY 

Cube map negative y target type.

ImageTargetCubeMapPositiveZ 

Cube map positive z target type.

ImageTargetCubeMapNegativeZ 

Cube map negative z target type.

ImageTargetExternal 
Enumerator
TargetInvalid 
TargetTwoDimensional 
TargetTwoDimensionalArray 
TargetTwoDimensionalMultisample 
TargetTwoDimensionalMultisampleArray 
TargetThreeDimensional 
TargetCubeMap 
TargetCubeMapArray 
TargetExternal 

Constructor & Destructor Documentation

kanzi::Texture::Texture ( Domain domain,
string_view  name = "" 
)
explicit
virtual kanzi::Texture::~Texture ( )
virtual

Member Function Documentation

static TextureSharedPtr kanzi::Texture::create ( Domain domain,
unsigned int  width,
unsigned int  height,
GraphicsFormat  format,
unsigned int  flags,
string_view  name = "" 
)
static

Creates a 2D texture with a specified shape and format.

The texture is created and deployed, and is ready for use after create(). When flags parameter is 0, the texture is created without mipmaps, with linear texture minification and magnification filters, without CPU accessible copy of texture data, with repeat texture addressing mode. Use setting flags to modify these features.

Parameters
widthWidth of the texture
heightHeight of the texture
formatFormat of the texture
flagsControls miscellaneous texture features,
See also
GraphicsTextureFlag
Returns
Newly created texture.
static TextureSharedPtr kanzi::Texture::create ( Domain domain,
vector< KzcImage * > const &  sourceImages,
unsigned int  flags,
string_view  name = "" 
)
static

Creates a texture with a specified source images.

The texture is created and deployed, and is ready for use after create(). When flags parameter is 0, the texture is created without mipmaps, with linear texture minification and magnification filters, without CPU accessible copy of texture data, with repeat texture addressing mode. Use setting flags to modify these features.

Parameters
sourceImagesSource images
flagsControls miscellaneous texture features,
See also
GraphicsTextureFlag
Returns
Newly created texture.
static TextureSharedPtr kanzi::Texture::create ( Domain domain,
KzcImage sourceImage,
unsigned int  flags,
string_view  name = "" 
)
static

Creates a texture with a specified source image.

The texture is created and deployed, and is ready for use after create(). When flags parameter is 0, the texture is created without mipmaps, with linear texture minification and magnification filters, without CPU accessible copy of texture data, with repeat texture addressing mode. Use setting flags to modify these features.

Parameters
sourceImageSource image
flagsControls miscellaneous texture features,
See also
GraphicsTextureFlag
Returns
Newly created texture.
static TextureSharedPtr kanzi::Texture::create ( Domain domain,
Target  target,
unsigned int  width,
unsigned int  height,
unsigned int  depth,
GraphicsFormat  format,
unsigned int  sampleCount,
unsigned int  mipmapLevelCount,
Sampler::MipmapMode  mipmapMode,
float  mipLodBias,
float  minLod,
float  maxLod,
Sampler::Filter  minificationFilter,
Sampler::Filter  magnificationFilter,
Sampler::AddressingMode  addressingMode,
float  anisotropy,
bool  createImages,
string_view  name = "" 
)
static

Creates a texture with a specified target, shape, format and sampler settings.

The texture is created and deployed, and is ready for use after create().

Parameters
targetTexture target
widthWidth of the texture
heightHeight of the texture
depthDepth of the texture (1 for 2D textures)
sampleCountReserved, always 0.
mipmapLevelCountNumber of mipmap levels. Minimum 1.
mipmapModeTexture mipmap mode
mipLodBiasReserved, always 0.0f.
minLodReserved, always 0.0f.
maxLodReserved, always 0.0f.
minificationFilterTexture minification filter
magnificationFilterTexture magnification filter
addressingmodeTexture addressing mode
anisotropyTexture anisotropy. You should use 1.0f as default value.
createImagesSet true if you want to keep CPU accessible copy of the texture data
Returns
Newly created texture.
SamplerSharedPtr kanzi::Texture::getSampler ( ) const

Returns the Sampler used by the texture.

Target kanzi::Texture::getTarget ( ) const

Returns the texture target used by the texture.

void kanzi::Texture::generateMipmaps ( )

Generates the mipmaps from the base level image.

void kanzi::Texture::setData ( unsigned int  face,
unsigned int  mipLevel,
unsigned int  x,
unsigned int  y,
unsigned int  width,
unsigned int  height,
const kzByte data 
) const

Sets the texture data for the specified area in the texture.

The texture data is updated to the GPU memory, and to the CPU accessible copy of the texture, if the texture is created with such storage.

Note
The format of the data must match the format of the texture.
Parameters
faceWhich texture face to update. For non-cubemap textures, always use 0. For cubemap textures, the faces are 0 = +X, 1 = -X, 2 = +Y, 3 = -Y, 4 = +Z, 5 = -Z.
mipLevelWhich mip level to update
x,y,width,heightSpecifies the rectangle to update.
dataTexture data
void kanzi::Texture::setData ( unsigned int  mipLevel,
const kzByte data 
) const

Sets the texture data for one mip level of a non-cubemap texture.

Parameters
mipLevelWhich mip level to update
dataTexture data
void kanzi::Texture::bind ( )

Prepares a texture for use by the renderer.

void kanzi::Texture::unbind ( )
static bool kanzi::Texture::areImagesValid ( Renderer renderer,
const vector< KzcImage * > &  images,
Texture::Target  target,
Sampler::MipmapMode  mipmapMode,
GraphicsFormat out_commonFormat,
unsigned int &  out_commonWidth,
unsigned int &  out_commonHeight,
unsigned int &  out_mipLevelCount 
)
static
KzcImage* kanzi::Texture::getImage ( unsigned int  face,
unsigned int  slice 
) const

Returns the CPU accessible copy of the texture data.

Parameters
faceWhich texture face to get the texture data from. For non-cubemap textures, always use 0. For cubemap textures, the faces are 0 = +X, 1 = -X, 2 = +Y, 3 = -Y, 4 = +Z, 5 = -Z.
sliceWhich texture slice to get the texture data from. Must be 0. Values greater than 0 are reserved for use with array and 3D textures.
bool kanzi::Texture::hasImages ( ) const

Returns true if the texture maintains the CPU accessible copy of the texture data.

unsigned int kanzi::Texture::getGLHandle ( ) const

Returns the GL API object handle of the framebuffer.

bool kanzi::Texture::isSupportedByRenderer ( ) const
virtual void kanzi::Texture::attach ( Framebuffer framebuffer,
Surface::APIAttachment  apiAttachment,
unsigned int  face,
unsigned int  mipLevel 
)
virtual

Implements kanzi::Surface.

virtual bool kanzi::Texture::isRenderable ( unsigned int  face,
unsigned int  mipLevel 
) const
virtual

Implements kanzi::Surface.

static TextureSharedPtr kanzi::Texture::createEmpty ( Domain domain,
string_view  name = "" 
)
staticprotected

Creates a texture without specifying the format or shape (also known as empty texture).

You must specify the format, shape, and any other features later with calls to initialize() and deploy the texture before using it.

Returns
Newly created texture.
void kanzi::Texture::initialize ( Target  target,
GraphicsFormat  format,
unsigned int  sampleCount,
unsigned int  width,
unsigned int  height,
bool  mipmaps,
bool  createImages 
)
protected

Sets the texture target, format, number of samples, dimensions, and whether mipmaps are used and images are created.

Texture data is not specified with this function.

Parameters
targetTexture target
formatFormat of the texture
sampleCountUse 0 for normal textures. Values greater than 0 are reserved for multisample textures.
widthWidth of the texture in texels
heightHeight of the texture in texels
mipmapsWhen false, the texture has only the base level image. When true, the texture has all mipmap levels.
createImagesWhen true, CPU accessibly copy of the texture data is allocated. When false, the texture data is not CPU accessible.
void kanzi::Texture::initialize ( Target  target,
vector< KzcImage * > const &  sourceImages,
unsigned int  createFlags 
)
protected

Initializes the texture format, shape, and data from the specified source images.

void kanzi::Texture::initialize ( Target  target,
KzcImage image,
unsigned int  createFlags 
)
protected

Initializes the texture format, shape, and data from the specified source image.

void kanzi::Texture::initialize ( Target  target,
int  glHandle 
)
protected

Prepare texture from pre-existing GL texture object.

void kanzi::Texture::samplerChanged ( )
protected
void kanzi::Texture::applySampler ( )
protected
void kanzi::Texture::applyFlags ( unsigned int  flags)
protected
virtual void kanzi::Texture::loadFromKZB ( const KzuResourceLoaderThreadContext threadContext,
KzcInputStream inputStream,
const KzuBinaryFileInfo file 
)
protectedvirtual

Function for loading the resource from .KZB.

This function is called when loading the data from .KZB file. Implementations should call super class loadFromKZB before reading anything else from inputStream. This function is called from arbitrary loading threads. The parameter threadContext contains thread safe memory manager and a thread specific Property manager which can be locked with the threadLock in the threadContext. This function may not access resource manager or the UIDomain due to race conditions.

Reimplemented from kanzi::GPUResource.

virtual unsigned int kanzi::Texture::getCPUMemoryUsage ( ) const
protectedvirtual

Function for getting the memory usage of a resource.

Reimplemented from kanzi::GPUResource.

virtual void kanzi::Texture::unloadOverride ( )
protectedvirtual

Unload function for resource.

Releases all memory taken by the resource except the resource loader.

Reimplemented from kanzi::GPUResource.

virtual void kanzi::Texture::invalidateOverride ( )
protectedvirtual

Notify resource that graphics context was lost and all GPU resources are invalid. Called by invalidate()

Reimplemented from kanzi::GPUResource.

virtual void kanzi::Texture::deployOverride ( )
protectedvirtual

Make graphics API object(s) in the resource usable by preparing GPU objects and data in them. Called by deploy()

Reimplemented from kanzi::Surface.

virtual void kanzi::Texture::undeployOverride ( )
protectedvirtual

Free the GPU objects. After this, the resource is not usable for graphics API until deploy() is called again. Called by undeploy()

Reimplemented from kanzi::GPUResource.

virtual void kanzi::Texture::freeCommonData ( )
protectedvirtual

Notify resource that graphics context was lost and all GPU resources are invalid.

Reimplemented from kanzi::Surface.

virtual unsigned int kanzi::Texture::getGPUMemoryUsageOverride ( ) const
protectedvirtual

Reimplemented from kanzi::GPUResource.

Friends And Related Function Documentation

friend class ResourceManager
friend
friend class Sampler
friend
friend class Framebuffer
friend

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