Class Texture

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll
API Level:
3

Texture represents a texture object used as input or output by shaders.

C#
Copy
public class Texture : BaseHandle, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable
Inheritance
System.Object
Tizen.NUI.Binding.BindableObject
Tizen.NUI.Binding.Element
Texture
Implements
System.ComponentModel.INotifyPropertyChanged
System.IDisposable

Constructors

View Source

Texture(TextureType, PixelFormat, UInt32, UInt32)

Creates a new Texture object.

Declaration
C#
Copy
public Texture(TextureType type, PixelFormat format, uint width, uint height)
Parameters
Type Name Description
TextureType type

The type of the texture.

PixelFormat format

The format of the pixel data.

System.UInt32 width

The width of the texture.

System.UInt32 height

The height of the texture.

API Level: 3

Methods

View Source

Dispose(DisposeTypes)

Dispose.

Declaration
C#
Copy
protected override void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type
Overrides
API Level: 3
View Source

GenerateMipmaps()

Generates mipmaps for the texture.
This will auto generate all the mipmaps for the texture based on the data in the base level.

Declaration
C#
Copy
public void GenerateMipmaps()
API Level: 3
View Source

GetHeight()

Returns the height of the texture..

Declaration
C#
Copy
public uint GetHeight()
Returns
Type Description
System.UInt32

The height, in pixels, of the texture.

API Level: 3
View Source

GetWidth()

Returns the width of the texture.

Declaration
C#
Copy
public uint GetWidth()
Returns
Type Description
System.UInt32

The width, in pixels, of the texture.

API Level: 3
View Source

Upload(PixelData)

Uploads data to the texture from a PixelData object.

Declaration
C#
Copy
public bool Upload(PixelData pixelData)
Parameters
Type Name Description
Tizen.NUI.PixelData pixelData

The pixelData object.

Returns
Type Description
System.Boolean

True if the PixelData object has compatible pixel format and fits within the texture, false otherwise.

API Level: 3
View Source

Upload(PixelData, UInt32, UInt32, UInt32, UInt32, UInt32, UInt32)

Uploads data to the texture from a PixelData object.

Declaration
C#
Copy
public bool Upload(PixelData pixelData, uint layer, uint mipmap, uint xOffset, uint yOffset, uint width, uint height)
Parameters
Type Name Description
Tizen.NUI.PixelData pixelData

The pixelData object.

System.UInt32 layer

The layer of a cube map or array texture.

System.UInt32 mipmap

The level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.

System.UInt32 xOffset

The horizontal offset of the rectangular area in the texture that will be updated.

System.UInt32 yOffset

The vertical offset of the rectangular area in the texture that will be updated.

System.UInt32 width

The width of the rectangular area in the texture that will be updated.

System.UInt32 height

height of the rectangular area in the texture that will be updated.

Returns
Type Description
System.Boolean

True if the PixelData object has compatible pixel format and fits within the texture, false otherwise.

API Level: 3

Implements

System.ComponentModel.INotifyPropertyChanged
System.IDisposable