Kanzi 3.9.10
TextureBuilder Class Reference

TextureBuilder is a class used for setting up properties to initialize textures. More...

Public Member Functions

 TextureBuilder ()
 Constructs a new TextureBuilder.
 
ObjectRef< Texturebuild (Domain domain)
 Builds a new texture.
 
void recreate (Texture tex)
 Creates a new texture and swaps it in place.
 
TextureBuilder setAddressingMode (SamplerAddressingMode mode)
 Sets the SamplerAddressingMode of the builder.
 
TextureBuilder setDepth (long depth)
 Sets the depth of the builder.
 
TextureBuilder setDepthCompareFunction (GraphicsCompareFunction func)
 Sets the depth GraphicsComparFunction of the builder.
 
TextureBuilder setFormat (GraphicsFormat format)
 Sets the GraphicsFormat of the builder.
 
TextureBuilder setHeight (long height)
 Sets the height of the builder.
 
TextureBuilder setImages (BitmapImage[] images)
 Sets the images of the builder.
 
TextureBuilder setMagnificationFilter (SamplerFilter filter)
 Sets the magnification SamplerFilter of the builder.
 
TextureBuilder setMemoryType (GPUResourceMemoryType memoryType)
 Sets the memoryType of the builder.
 
TextureBuilder setMinificationFilter (SamplerFilter filter)
 Sets the minification SamplerFilter of the builder.
 
TextureBuilder setMipmapLevelCount (long mipmapLevelCount)
 Sets the mipmapLevelCount of the builder.
 
TextureBuilder setMipmapMode (SamplerMipmapMode mode)
 Sets the SamplerMipmapMode of the builder.
 
TextureBuilder setName (String name)
 Sets the name of the builder.
 
TextureBuilder setType (TextureType type)
 Sets the TextureType of the builder.
 
TextureBuilder setWidth (long width)
 Sets the width of the builder.
 

Detailed Description

TextureBuilder is a class used for setting up properties to initialize textures.

To create a new texture, initialize a builder and set the various properties. Then invoke build() to get a new texture out of it.

Member Function Documentation

◆ build()

ObjectRef< Texture > build ( Domain domain)

Builds a new texture.

Parameters
domainUI Domain where this texture belongs.
Returns
The resulting texture.

◆ recreate()

void recreate ( Texture tex)

Creates a new texture and swaps it in place.

Parameters
texThe texture that is being replaced.

◆ setAddressingMode()

TextureBuilder setAddressingMode ( SamplerAddressingMode mode)

Sets the SamplerAddressingMode of the builder.

Parameters
modeThe mode value.
Returns
The TextureBuilder.

◆ setDepth()

TextureBuilder setDepth ( long depth)

Sets the depth of the builder.

Parameters
depthThe depth value.
Returns
The TextureBuilder.

◆ setDepthCompareFunction()

TextureBuilder setDepthCompareFunction ( GraphicsCompareFunction func)

Sets the depth GraphicsComparFunction of the builder.

Parameters
funcThe GraphicsCompareFunction value.
Returns
The TextureBuilder.

◆ setFormat()

TextureBuilder setFormat ( GraphicsFormat format)

Sets the GraphicsFormat of the builder.

Parameters
formatThe format value.
Returns
The TextureBuilder.

◆ setHeight()

TextureBuilder setHeight ( long height)

Sets the height of the builder.

Parameters
heightThe height value.
Returns
The TextureBuilder.

◆ setImages()

TextureBuilder setImages ( BitmapImage[] images)

Sets the images of the builder.

Parameters
imagesArray of com.rightware.kanzi.BitmapImage instances.
Returns
The TextureBuilder.

◆ setMagnificationFilter()

TextureBuilder setMagnificationFilter ( SamplerFilter filter)

Sets the magnification SamplerFilter of the builder.

Parameters
filterThe filter value.
Returns
The TextureBuilder.

◆ setMemoryType()

TextureBuilder setMemoryType ( GPUResourceMemoryType memoryType)

Sets the memoryType of the builder.

Parameters
memoryTypeThe memoryType value.
Returns
The TextureBuilder.

◆ setMinificationFilter()

TextureBuilder setMinificationFilter ( SamplerFilter filter)

Sets the minification SamplerFilter of the builder.

Parameters
filterThe filter value.
Returns
The TextureBuilder.

◆ setMipmapLevelCount()

TextureBuilder setMipmapLevelCount ( long mipmapLevelCount)

Sets the mipmapLevelCount of the builder.

Parameters
mipmapLevelCountThe mipmapLevelCount value.
Returns
The TextureBuilder.

◆ setMipmapMode()

TextureBuilder setMipmapMode ( SamplerMipmapMode mode)

Sets the SamplerMipmapMode of the builder.

Parameters
modeThe mode value.
Returns
The TextureBuilder.

◆ setName()

TextureBuilder setName ( String name)

Sets the name of the builder.

Parameters
nameThe name value.
Returns
The TextureBuilder.

◆ setType()

TextureBuilder setType ( TextureType type)

Sets the TextureType of the builder.

Parameters
typeThe format value.
Returns
The TextureBuilder.

◆ setWidth()

TextureBuilder setWidth ( long width)

Sets the width of the builder.

Parameters
widthThe width value.
Returns
The TextureBuilder.