Class RenderSessionHandle
Owner-thread render session handle bound to a map.
public sealed class RenderSessionHandle : IDisposable
- Inheritance
-
RenderSessionHandle
- Implements
- Inherited Members
Properties
IsClosed
public bool IsClosed { get; }
Property Value
Methods
AcquireMetalOwnedTextureFrame()
public MetalOwnedTextureFrameHandle AcquireMetalOwnedTextureFrame()
Returns
AcquireOpenGLOwnedTextureFrame()
public OpenGLOwnedTextureFrameHandle AcquireOpenGLOwnedTextureFrame()
Returns
AcquireVulkanOwnedTextureFrame()
public VulkanOwnedTextureFrameHandle AcquireVulkanOwnedTextureFrame()
Returns
AttachMetalBorrowedTexture(MapHandle, MetalBorrowedTextureDescriptor)
public static RenderSessionHandle AttachMetalBorrowedTexture(MapHandle map, MetalBorrowedTextureDescriptor descriptor)
Parameters
mapMapHandledescriptorMetalBorrowedTextureDescriptor
Returns
AttachMetalOwnedTexture(MapHandle, MetalOwnedTextureDescriptor)
public static RenderSessionHandle AttachMetalOwnedTexture(MapHandle map, MetalOwnedTextureDescriptor descriptor)
Parameters
mapMapHandledescriptorMetalOwnedTextureDescriptor
Returns
AttachMetalSurface(MapHandle, MetalSurfaceDescriptor)
public static RenderSessionHandle AttachMetalSurface(MapHandle map, MetalSurfaceDescriptor descriptor)
Parameters
mapMapHandledescriptorMetalSurfaceDescriptor
Returns
AttachOpenGLBorrowedTexture(MapHandle, OpenGLBorrowedTextureDescriptor)
public static RenderSessionHandle AttachOpenGLBorrowedTexture(MapHandle map, OpenGLBorrowedTextureDescriptor descriptor)
Parameters
mapMapHandledescriptorOpenGLBorrowedTextureDescriptor
Returns
AttachOpenGLOwnedTexture(MapHandle, OpenGLOwnedTextureDescriptor)
public static RenderSessionHandle AttachOpenGLOwnedTexture(MapHandle map, OpenGLOwnedTextureDescriptor descriptor)
Parameters
mapMapHandledescriptorOpenGLOwnedTextureDescriptor
Returns
AttachOpenGLSurface(MapHandle, OpenGLSurfaceDescriptor)
public static RenderSessionHandle AttachOpenGLSurface(MapHandle map, OpenGLSurfaceDescriptor descriptor)
Parameters
mapMapHandledescriptorOpenGLSurfaceDescriptor
Returns
AttachVulkanBorrowedTexture(MapHandle, VulkanBorrowedTextureDescriptor)
public static RenderSessionHandle AttachVulkanBorrowedTexture(MapHandle map, VulkanBorrowedTextureDescriptor descriptor)
Parameters
mapMapHandledescriptorVulkanBorrowedTextureDescriptor
Returns
AttachVulkanOwnedTexture(MapHandle, VulkanOwnedTextureDescriptor)
public static RenderSessionHandle AttachVulkanOwnedTexture(MapHandle map, VulkanOwnedTextureDescriptor descriptor)
Parameters
mapMapHandledescriptorVulkanOwnedTextureDescriptor
Returns
AttachVulkanSurface(MapHandle, VulkanSurfaceDescriptor)
public static RenderSessionHandle AttachVulkanSurface(MapHandle map, VulkanSurfaceDescriptor descriptor)
Parameters
mapMapHandledescriptorVulkanSurfaceDescriptor
Returns
ClearData()
public void ClearData()
Close()
Destroys the render session on the map owner thread.
public void Close()
Detach()
public void Detach()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
DumpDebugLogs()
public void DumpDebugLogs()
GetFeatureState(FeatureStateSelector)
public byte[] GetFeatureState(FeatureStateSelector selector)
Parameters
selectorFeatureStateSelector
Returns
- byte[]
QueryFeatureExtension(string, byte[], string, string, byte[]?)
Queries a feature extension from the latest render session state.
public byte[] QueryFeatureExtension(string sourceId, byte[] feature, string extension, string extensionField, byte[]? arguments)
Parameters
Returns
- byte[]
QueryRenderedFeatures(RenderedQueryGeometry, RenderedFeatureQueryOptions?)
public QueriedFeature[] QueryRenderedFeatures(RenderedQueryGeometry geometry, RenderedFeatureQueryOptions? options)
Parameters
geometryRenderedQueryGeometryoptionsRenderedFeatureQueryOptions
Returns
QuerySourceFeatures(string, SourceFeatureQueryOptions?)
public QueriedFeature[] QuerySourceFeatures(string sourceId, SourceFeatureQueryOptions? options)
Parameters
sourceIdstringoptionsSourceFeatureQueryOptions
Returns
ReadPremultipliedRgba8(NativeBuffer)
public TextureImageInfo ReadPremultipliedRgba8(NativeBuffer buffer)
Parameters
bufferNativeBuffer
Returns
ReduceMemoryUse()
public void ReduceMemoryUse()
RemoveFeatureState(FeatureStateSelector)
public void RemoveFeatureState(FeatureStateSelector selector)
Parameters
selectorFeatureStateSelector
RenderUpdate()
Renders the latest available map render update into this session's render target. The map retains its latest update, so repeated calls re-render it and report Rendered again. Every other result names the wake to wait for: NoUpdate and SizePending resolve on a render-update-available event, and TargetNotReady resolves when the host changes the render target. The returned NeedsRepaint flag tells whether the map asked for another frame while it rendered this one.
public RenderUpdate RenderUpdate()
Returns
Resize(uint, uint, double)
Resizes this attached render session. Surface and owned-texture sessions resize in place; a borrowed texture target throws an unsupported-feature error, since its owner sizes it — hand over a new texture with the backend's set-target method instead. A resize keeps the session's renderer and renderer-held state such as feature state, unless the scale factor changes, which starts a new renderer with that state empty.
public void Resize(uint width, uint height, double scaleFactor)
Parameters
SetFeatureState(FeatureStateSelector, byte[])
public void SetFeatureState(FeatureStateSelector selector, byte[] value)
Parameters
selectorFeatureStateSelectorvaluebyte[]
SetMetalBorrowedTextureTarget(MetalBorrowedTextureDescriptor)
Renders this attached texture session into a new caller-owned texture, keeping the session's renderer unless the scale factor changes, which starts a new renderer. The replacement must belong to the device this session attached with, which throws an invalid-argument error otherwise, and carry the pixel format it attached with, which throws an unsupported-feature error otherwise; both leave this session rendering into the texture it has. The caller owns the replacement and keeps it valid until the next replacement, detach, or dispose. The outgoing texture is neither read nor released here.
public void SetMetalBorrowedTextureTarget(MetalBorrowedTextureDescriptor descriptor)
Parameters
descriptorMetalBorrowedTextureDescriptor
SetMetalSurfaceTarget(MetalSurfaceDescriptor)
Presents this attached surface session through a new surface, keeping the session's renderer and its cached state. The descriptor must name the same graphics context this session attached with; one whose context device is neither null nor this session's device throws an invalid-argument error and leaves this session rendering into the surface it has. The descriptor's extent applies as Resize(uint, uint, double) applies one.
public void SetMetalSurfaceTarget(MetalSurfaceDescriptor descriptor)
Parameters
descriptorMetalSurfaceDescriptor
SetOpenGLBorrowedTextureTarget(OpenGLBorrowedTextureDescriptor)
Renders this attached texture session into a new caller-owned texture. See SetMetalBorrowedTextureTarget(MetalBorrowedTextureDescriptor) for what replacing a target preserves. The replacement belongs to the context this session attached with, or one in its share group, and the host context must be current on this thread.
public void SetOpenGLBorrowedTextureTarget(OpenGLBorrowedTextureDescriptor descriptor)
Parameters
descriptorOpenGLBorrowedTextureDescriptor
SetOpenGLSurfaceTarget(OpenGLSurfaceDescriptor)
Presents this attached surface session through a new surface. See SetMetalSurfaceTarget(MetalSurfaceDescriptor) for what replacing a surface preserves. The new surface is made current on the next render, so a host may hand over a replacement for one it has already destroyed, and an unusable surface is reported by the next RenderUpdate().
public void SetOpenGLSurfaceTarget(OpenGLSurfaceDescriptor descriptor)
Parameters
descriptorOpenGLSurfaceDescriptor
SetVulkanBorrowedTextureTarget(VulkanBorrowedTextureDescriptor)
Renders this attached texture session into a new caller-owned image. See SetMetalBorrowedTextureTarget(MetalBorrowedTextureDescriptor) for what replacing a target preserves. The replacement must carry the format and both layouts this session attached with, since its render pass was built around them.
public void SetVulkanBorrowedTextureTarget(VulkanBorrowedTextureDescriptor descriptor)
Parameters
descriptorVulkanBorrowedTextureDescriptor
SetVulkanSurfaceTarget(VulkanSurfaceDescriptor)
Presents this attached surface session through a new surface. See SetMetalSurfaceTarget(MetalSurfaceDescriptor) for what replacing a surface preserves. The outgoing VkSurfaceKHR must still be valid, since this session holds a swapchain built from it. The replacement must report the color format and surface-transform support this session compiled a render pass and shaders for, or it throws an unsupported-feature error.
public void SetVulkanSurfaceTarget(VulkanSurfaceDescriptor descriptor)
Parameters
descriptorVulkanSurfaceDescriptor
TextureImageInfo()
public TextureImageInfo TextureImageInfo()