Macros | Functions
Texture Object

The Evas_Canvas3D_Texture structure associates a 2D bitmap image to a material for a surface. More...

Macros

#define EVAS_CANVAS3D_TEXTURE_CLASS   evas_canvas3d_texture_class_get()
 Evas 3d canvas texture class.
 

Functions

EOAPI void evas_canvas3d_texture_source_visible_set (Eo *obj, Eina_Bool visible)
 The visibility flag of the source evas object of the given texture. More...
 
EOAPI Eina_Bool evas_canvas3d_texture_source_visible_get (const Eo *obj)
 The visibility flag of the source evas object of the given texture. More...
 
EOAPI void evas_canvas3d_texture_atlas_enable_set (Eo *obj, Eina_Bool use_atlas)
 Enable flag to generation texture unit with support atlas. More...
 
EOAPI Eina_Bool evas_canvas3d_texture_atlas_enable_get (const Eo *obj)
 Enable flag to generation texture unit with support atlas. More...
 
EOAPI void evas_canvas3d_texture_data_set (Eo *obj, Evas_Colorspace color_format, int w, int h, const void *data)
 Set the data of the given texture. More...
 
EOAPI void evas_canvas3d_texture_source_set (Eo *obj, Efl_Canvas_Object *source)
 Set the data of the given texture from an evas object. More...
 
EOAPI Evas_Colorspace evas_canvas3d_texture_color_format_get (const Eo *obj)
 Get the color format of the given texture. More...
 
EOAPI void evas_canvas3d_texture_size_get (const Eo *obj, int *w, int *h)
 Get the size of the given texture. More...
 
EOAPI void evas_canvas3d_texture_wrap_set (Eo *obj, Evas_Canvas3D_Wrap_Mode s, Evas_Canvas3D_Wrap_Mode t)
 Set the wrap mode of the given texture. More...
 
EOAPI void evas_canvas3d_texture_wrap_get (Eo *obj, Evas_Canvas3D_Wrap_Mode *s, Evas_Canvas3D_Wrap_Mode *t)
 Get the wrap mode of the given texture. More...
 
EOAPI void evas_canvas3d_texture_filter_set (Eo *obj, Evas_Canvas3D_Texture_Filter min, Evas_Canvas3D_Texture_Filter mag)
 Set the filter of the given texture. More...
 
EOAPI void evas_canvas3d_texture_filter_get (const Eo *obj, Evas_Canvas3D_Texture_Filter *min, Evas_Canvas3D_Texture_Filter *mag)
 Get the filter of the given texture. More...
 

Detailed Description

The Evas_Canvas3D_Texture structure associates a 2D bitmap image to a material for a surface.

Image data for the texture can be loaded from memory, a file, or an Evas_Object. Use the evas_canvas3d_material_texture_set() function to add the texture to an Evas_Canvas3DMaterial's slot.

Function Documentation

◆ evas_canvas3d_texture_source_visible_set()

EOAPI void evas_canvas3d_texture_source_visible_set ( Eo obj,
Eina_Bool  visible 
)

The visibility flag of the source evas object of the given texture.

Call evas_object_show on the source object and control the visibility using this function.

By default the source object is visible.

See also evas_canvas3d_texture_source_set.

Parameters
[in]objThe object.
[in]visibletrue for visible, false for invisible.

◆ evas_canvas3d_texture_source_visible_get()

EOAPI Eina_Bool evas_canvas3d_texture_source_visible_get ( const Eo obj)

The visibility flag of the source evas object of the given texture.

Call evas_object_show on the source object and control the visibility using this function.

By default the source object is visible.

See also evas_canvas3d_texture_source_set.

Parameters
[in]objThe object.
Returns
true for visible, false for invisible.

◆ evas_canvas3d_texture_atlas_enable_set()

EOAPI void evas_canvas3d_texture_atlas_enable_set ( Eo obj,
Eina_Bool  use_atlas 
)

Enable flag to generation texture unit with support atlas.

Use this flag only when you cannot normalize texture coordinates.

By default it is enabled.

Parameters
[in]objThe object.
[in]use_atlastrue for enable, false for disable.

◆ evas_canvas3d_texture_atlas_enable_get()

EOAPI Eina_Bool evas_canvas3d_texture_atlas_enable_get ( const Eo obj)

Enable flag to generation texture unit with support atlas.

Use this flag only when you cannot normalize texture coordinates.

By default it is enabled.

Parameters
[in]objThe object.
Returns
true for enable, false for disable.

◆ evas_canvas3d_texture_data_set()

EOAPI void evas_canvas3d_texture_data_set ( Eo obj,
Evas_Colorspace  color_format,
int  w,
int  h,
const void *  data 
)

Set the data of the given texture.

See also efl_file_set.

Parameters
[in]objThe object.
[in]color_formatColor format of the texture.
[in]wWidth of the data.
[in]hHeight of the data.
[in]dataPointer to the data.

◆ evas_canvas3d_texture_source_set()

EOAPI void evas_canvas3d_texture_source_set ( Eo obj,
Efl_Canvas_Object source 
)

Set the data of the given texture from an evas object.

Evas 3D support using existing evas object as a texture source. This feature make it possible using any existing evas object inside 3D scene.

See also evas_canvas3d_texture_source_visible_set.

Parameters
[in]objThe object.
[in]sourceSource evas object to be used as the texture data.

Referenced by evas_object_del().

◆ evas_canvas3d_texture_color_format_get()

EOAPI Evas_Colorspace evas_canvas3d_texture_color_format_get ( const Eo obj)

Get the color format of the given texture.

EVAS_CANVAS3D_COLOR_FORMAT_RGBA will be returned if the texture has source object. Otherwise, the color format of the data will be returned.

See also evas_canvas3d_texture_data_set, efl_file_set, evas_canvas3d_texture_source_set.

Parameters
[in]objThe object.
Returns
Color format of the given texture

◆ evas_canvas3d_texture_size_get()

EOAPI void evas_canvas3d_texture_size_get ( const Eo obj,
int *  w,
int *  h 
)

Get the size of the given texture.

If the texture has a source object, the size of the source object will be returned. Otherwise the size of the data (or image file) will be returned.

See also evas_canvas3d_texture_data_set, efl_file_set, evas_canvas3d_texture_source_set.

Parameters
[in]objThe object.
[out]wPointer to receive the width of the texture size.
[out]hPointer to receive the height of the texture size.

◆ evas_canvas3d_texture_wrap_set()

EOAPI void evas_canvas3d_texture_wrap_set ( Eo obj,
Evas_Canvas3D_Wrap_Mode  s,
Evas_Canvas3D_Wrap_Mode  t 
)

Set the wrap mode of the given texture.

If the texture coordinate exceed range [0.0, 1.0] the values are modified according to the wrap mode.

Default wrap modes are both EVAS_CANVAS3D_WRAP_MODE_CLAMP for s and t.

Parameters
[in]objThe object.
[in]sWrap mode for S-axis.
[in]tWrap mode for T-axis.

◆ evas_canvas3d_texture_wrap_get()

EOAPI void evas_canvas3d_texture_wrap_get ( Eo obj,
Evas_Canvas3D_Wrap_Mode *  s,
Evas_Canvas3D_Wrap_Mode *  t 
)

Get the wrap mode of the given texture.

See also evas_canvas3d_texture_wrap_set.

Parameters
[in]objThe object.
[out]sPointer to receive S-axis wrap mode.
[out]tPointer to receive T-axis wrap mode.

◆ evas_canvas3d_texture_filter_set()

EOAPI void evas_canvas3d_texture_filter_set ( Eo obj,
Evas_Canvas3D_Texture_Filter  min,
Evas_Canvas3D_Texture_Filter  mag 
)

Set the filter of the given texture.

Default filters are both EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST for s and t.

Parameters
[in]objThe object.
[in]minMinification filter used when down-scaling.
[in]magMagnification filter used when up-scaling.

◆ evas_canvas3d_texture_filter_get()

EOAPI void evas_canvas3d_texture_filter_get ( const Eo obj,
Evas_Canvas3D_Texture_Filter *  min,
Evas_Canvas3D_Texture_Filter *  mag 
)

Get the filter of the given texture.

See also evas_canvas3d_texture_filter_set.

Parameters
[in]objThe object.
[out]minPointer to receive the minification filter.
[out]magPointer to receive the magnification filter.