Skip to main content

ICompositionGlTexture Interface

Definition​

Namespace:Avalonia.OpenGL
Assembly:Avalonia.OpenGL
Package:Avalonia
public interface ICompositionGlTexture

Implements: IAsyncDisposable

Remarks​

All members can only be used on the thread the associated Avalonia.Rendering.Composition.Compositor belongs to.

Methods​

NameDescription
BeginDrawPrepares the texture to be rendered to by user code. User code can bind the texture to their framebuffer, however the texture should be unbound before ending the returned lease.

BeginDraw Method​

Prepares the texture to be rendered to by user code. User code can bind the texture to their framebuffer, however the texture should be unbound before ending the returned lease.

public Avalonia.OpenGL.ICompositionGlTextureLease BeginDraw()

Returns​

Avalonia.OpenGL.ICompositionGlTextureLease

Exceptions​

Properties​

NameDescription
IsReadyForDrawReturns true when the texture can be drawn to: there is no active lease and the last presentation, if any, has completed successfully. A presentation failure leaves this property permanently false, check Avalonia.OpenGL.ICompositionGlContext.IsValidForInterop in that case.
SizeThe pixel size of the texture.

IsReadyForDraw Property​

Returns true when the texture can be drawn to: there is no active lease and the last presentation, if any, has completed successfully. A presentation failure leaves this property permanently false, check Avalonia.OpenGL.ICompositionGlContext.IsValidForInterop in that case.

public bool IsReadyForDraw { get; set; }

Size Property​

The pixel size of the texture.

public Avalonia.PixelSize Size { get; set; }