Class MTLSwapChain
This class represents a native swap chain object in Metal.
Inherited Members
Namespace: Evergine.Metal
Assembly: Evergine.Metal.dll
Syntax
public class MTLSwapChain : SwapChain
Constructors
MTLSwapChain(GraphicsContext, SwapChainDescription)
Initializes a new instance of the MTLSwapChain class.
Declaration
public MTLSwapChain(GraphicsContext context, SwapChainDescription description)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsContext | context | Graphics context. |
| SwapChainDescription | description | SwapChain description. |
Properties
CurrentDrawable
Gets the current CA Metal drawable.
Declaration
public ICAMetalDrawable CurrentDrawable { get; }
Property Value
| Type | Description |
|---|---|
| ICAMetalDrawable |
MetalLayer
Gets the Core Animation Metal layer.
Declaration
public CAMetalLayer MetalLayer { get; }
Property Value
| Type | Description |
|---|---|
| CAMetalLayer |
Name
Gets or sets a string identifying this instance. Can be used in graphics debugging tools.
Declaration
public override string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
RenderPassDescriptor
Gets the render pass descriptor.
Declaration
public MTLRenderPassDescriptor RenderPassDescriptor { get; }
Property Value
| Type | Description |
|---|---|
| MTLRenderPassDescriptor |
VerticalSync
Gets or sets a value indicating whether vertical synchronization is enabled or not.
Declaration
public override bool VerticalSync { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public override void Dispose()
Overrides
GetCurrentFramebufferTexture()
Gets the current framebuffer texture.
Declaration
public override Texture GetCurrentFramebufferTexture()
Returns
| Type | Description |
|---|---|
| Texture | Framebuffer texture. |
Overrides
InitFrame()
This method is invoked when the frame starts.
Declaration
public override void InitFrame()
Overrides
Present()
Presents a rendered image to the user.
Declaration
public override void Present()
Overrides
RefreshSurfaceInfo(SurfaceInfo)
The swapchain surface information has changed.
Declaration
public override void RefreshSurfaceInfo(SurfaceInfo surfaceInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| SurfaceInfo | surfaceInfo | The surface information. |
Overrides
ResizeSwapChain(uint, uint)
Resizes the SwapChain.
Declaration
public override void ResizeSwapChain(uint width, uint height)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | width | The new width. |
| uint | height | The new height. |