Meta.MultiTexture
Description: Reference for Meta.MultiTexture

### Class

# MetaMultiTexture

#### Description [src]

    final class Meta.MultiTexture : GObject.Object
    {
      /* No available fields */
    }

A texture that can have multiple planes.

`MetaMultiTexture` allows one to deal with non-trivial formats that have multiple planes, requires subsampling and/or aren’t in RGB. A common example of this are decoded video frames, which often use something in the YUV colorspace, combined with subsampling.

The basic idea of a `MetaMultiTexture` is the following: - Each plane is represented by a separate `CoglTexture`. That means that you should add each of these planes as a layer to your CoglPipeline. - When dealing with a color space that is not RGB, you can ask the `MetaMultiTexture` to create a shader for you that does the conversion in the GPU. - In case you need to deal with memory access in a format with subsampling, you can use `meta_multi_texture_get_width()` and its analogous version for the height to get the correct size of the texture.

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### meta_multi_texture_new

Creates a `MetaMultiTexture` with the given `format`. Each of the `CoglTexture`s represents a plane.

###### meta_multi_texture_new_simple

Creates a `MetaMultiTexture` for a “simple” texture, i.e. with only one plane, in a format that can be represented using `CoglPixelFormat`.

#### Instance methods

###### meta_multi_texture_add_pipeline_sampling

No description available.

###### meta_multi_texture_get_format

Returns the `MetaMultiTextureFormat` that is used by this texture.

###### meta_multi_texture_get_height

Returns the height of the `MetaMultiTexture`. Prefer this over calling `cogl_texture_get_height()` on one of the textures, as that might give a different size when dealing with subsampling.

###### meta_multi_texture_get_n_planes

Returns the number of planes for this texture. Note that this is entirely dependent on the `CoglPixelFormat` that is used. For example, simple RGB textures will have a single plane, while some more convoluted formats like NV12 and YUV 4:4:4 can have 2 and 3 planes respectively.

###### meta_multi_texture_get_plane

Returns the n’th plane of the `MetaMultiTexture`. Note that it’s a programming error to use with an index larger than meta_multi_texture_get_n_planes().

###### meta_multi_texture_get_width

Returns the width of the `MetaMultiTexture`. Prefer this over calling `cogl_texture_get_width()` on one of the textures, as that might give a different size when dealing with subsampling.

###### meta_multi_texture_is_simple

A small function that checks whether the given multi texture uses a “simple” format, i.e. one that can be represented by a `CoglPixelFormat`.

###### meta_multi_texture_to_string

Returns a string representation of `multi_texture`, useful for debugging purposes.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct MetaMultiTextureClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.