# MetalTextureRender

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-media-metal/trait-metaltexturerender/

**trait** · [`ferroui-media-metal`](/docs/0.5.0/api/ferroui-media-metal/) · v0.5.0

```rust
trait MetalTextureRender: Send + Sync
```

Client-owned scene and library adapter. Encode premultiplied sRGB BGRA8
output, including transparent pixels. Input metadata supplies crop,
orientation and color; the client owns its shading and hit testing.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Metal/lib.rs#L96)

## Members

- [`encode`](#function-encode)

<a id="function-encode"></a>

### encode

```rust
fn encode(self: &Self, context: &MetalRenderContext<'_>, viewport: RendererViewport, inputs: &[FrameLease]) -> Result<(), MediaError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Metal/lib.rs#L97)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
