ICompositionGlTexture Interface
Definition
A texture that can be drawn to by user code and presented to a Avalonia.Rendering.Composition.CompositionDrawingSurface. Create instances via Avalonia.OpenGL.ICompositionGlContext.CreateTexture(Avalonia.Rendering.Composition.CompositionDrawingSurface,Avalonia.PixelSize).
public interface ICompositionGlTexture
Remarks
All members can only be used on the thread the associated Avalonia.Rendering.Composition.Compositor belongs to.
Methods
| Name | Description |
|---|---|
| BeginDraw | 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. |
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
| Name | Description |
|---|---|
| IsReadyForDraw | 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. |
| Size | The 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; }