Tizen(Headed) Native API  6.5

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

Inheritance diagram for Dali::Texture:
Dali::BaseHandle

Public Member Functions

 Texture ()
 Default constructor, creates an empty handle.
 ~Texture ()
 Destructor.
 Texture (const Texture &handle)
 Copy constructor, creates a new handle to the same object.
Textureoperator= (const Texture &handle)
 Assignment operator, changes this handle to point at the same object.
bool Upload (PixelData pixelData)
 Uploads data to the texture from a PixelData object.
bool Upload (PixelData pixelData, uint32_t layer, uint32_t mipmap, uint32_t xOffset, uint32_t yOffset, uint32_t width, uint32_t height)
 Uploads data to the texture from a PixelData object.
void GenerateMipmaps ()
 Generates mipmaps for the texture. This will auto generate all the mipmaps for the texture based on the data in the base level.
uint32_t GetWidth () const
 Returns the width of the texture.
uint32_t GetHeight () const
 Returns the height of the texture.
 Texture (Internal::Texture *pointer)
 The constructor.

Static Public Member Functions

static Texture New (TextureType::Type type, Pixel::Format format, uint32_t width, uint32_t height)
 Creates a new Texture object.
static Texture New (NativeImageInterface &nativeImageInterface)
 Creates a new Texture object from a native image.
static Texture DownCast (BaseHandle handle)
 Downcasts to a texture. If not, the returned handle is left uninitialized.

Detailed Description

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

Since:
3.0, DALi version 1.1.43

Constructor & Destructor Documentation

Default constructor, creates an empty handle.

Since:
3.0, DALi version 1.1.43

Destructor.

Since:
3.0, DALi version 1.1.43
Dali::Texture::Texture ( const Texture handle)

Copy constructor, creates a new handle to the same object.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]handleHandle to an object
Dali::Texture::Texture ( Internal::Texture *  pointer) [explicit]

The constructor.

Note:
Not intended for application developers.
Since:
3.0, DALi version 1.1.43
Parameters:
[in]pointerA pointer to a newly allocated Texture

Member Function Documentation

static Texture Dali::Texture::DownCast ( BaseHandle  handle) [static]

Downcasts to a texture. If not, the returned handle is left uninitialized.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]handleHandle to an object
Returns:
Texture handle or an uninitialized handle

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

Since:
3.0, DALi version 1.1.43
uint32_t Dali::Texture::GetHeight ( ) const

Returns the height of the texture.

Since:
3.0, DALi version 1.1.43
Returns:
The height, in pixels, of the texture
uint32_t Dali::Texture::GetWidth ( ) const

Returns the width of the texture.

Since:
3.0, DALi version 1.1.43
Returns:
The width, in pixels, of the texture
static Texture Dali::Texture::New ( TextureType::Type  type,
Pixel::Format  format,
uint32_t  width,
uint32_t  height 
) [static]

Creates a new Texture object.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]typeThe type of the texture
[in]formatThe format of the pixel data
[in]widthThe width of the texture
[in]heightThe height of the texture
Returns:
A handle to a newly allocated Texture
static Texture Dali::Texture::New ( NativeImageInterface nativeImageInterface) [static]

Creates a new Texture object from a native image.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]nativeImageInterfaceA native image
Returns:
A handle to a newly allocated Texture
Note:
It is not possible to upload data to textures created from a native image using Upload methods although there might be platform specific APIs to upload data to a native image.
Texture& Dali::Texture::operator= ( const Texture handle)

Assignment operator, changes this handle to point at the same object.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]handleHandle to an object
Returns:
Reference to the assigned object
bool Dali::Texture::Upload ( PixelData  pixelData)

Uploads data to the texture from a PixelData object.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]pixelDataThe pixelData object
Returns:
True if the PixelData object has compatible pixel format and fits within the texture, false otherwise
bool Dali::Texture::Upload ( PixelData  pixelData,
uint32_t  layer,
uint32_t  mipmap,
uint32_t  xOffset,
uint32_t  yOffset,
uint32_t  width,
uint32_t  height 
)

Uploads data to the texture from a PixelData object.

Note:
Upload does not upsample or downsample pixel data to fit the specified rectangular area in the texture.
Since:
3.0, DALi version 1.1.43
Parameters:
[in]pixelDataThe pixelData object
[in]layerSpecifies the layer of a cube map or array texture (Unused for 2D textures).
See also:
CubeMapLayer
Parameters:
[in]mipmapSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image
[in]xOffsetSpecifies an horizontal offset of the rectangular area in the texture that will be updated
[in]yOffsetSpecifies a vertical offset of the rectangular area in the texture that will be updated
[in]widthSpecifies the width of the rectangular area in the texture that will be updated
[in]heightSpecifies the height of the rectangular area in the texture that will be updated
Returns:
True if the PixelData object has compatible pixel format and fits in the rectangle specified, false otherwise