Click or drag to resize
Ab4d.SharpEngine logo

PresentationTypes Enumeration

PresentationTypes enum defines how the SharpEngine will present the 3D scene to the UI framework. Not all presentation types are supported on all platforms. To check if a specific presentation type is supported, call the SharpEngineSceneView.IsPresentationTypeSupported method.

Namespace: Ab4d.SharpEngine.Common
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public enum PresentationTypes
Members
Member nameValueDescription
None0 No 3D image will be rendered and only BackgroundColor will be shown. This value is set before Initialize method is called or when 3D rendering engine cannot be initialized.
WriteableBitmap1 WriteableBitmap object is used to show the 3D scene. WriteableBitmap is the slowest presentation type because the engine first needs to wait for the graphics card to finish rendering the 3D scene and then the rendered 3D scene is copied from graphics card memory to main memory into a WriteableBitmap object. From there the UI framework can show content of WriteableBitmap on the screen - usually this is done by copying the content back to the graphics card. WriteableBitmap presentation type support composition of rendered 3D scene with other IO elements (for example, UI buttons can be shown on top of 3D scene). This presentation type is supported on all platforms and UI frameworks.
SharedTexture2 SharedTexture presentation type is using a shared texture to show the 3D scene. This presentation type is faster then WriteableBitmap because the rendered texture is not copied to main memory but instead a texture data stayed on the graphics card where it is shared between Vulkan and UI framework. SharedTexture presentation type support composition of rendered 3D scene with other IO elements (for example, UI buttons can be shown on top of 3D scene). This presentation type is faster then WriteableBitmap because the texture data stays on the graphics card, but slower then the OverlayTexture because the engine needs to wait for the graphics card to finish rendering the 3D scene. This presentation type is not supported on all platforms and UI frameworks - when used in the Initialize method, then WriteableBitmap is used as a fallback.
OverlayTexture3 OverlayTexture is the fastest presentation type because the graphics card can render the scene in the background (engine does not need to wait for graphics card to finish rendering). When rendering is complete the Vulkan presents the 3D scene to the dedicated screen area that is shown on top of the application (as na overlay). OverlayTexture presentation type does not support composition of rendered 3D scene with other IO elements (3D scene is always shown on top of any UI elements). This presentation type is not supported on all platforms and UI frameworks - when used in the Initialize method, then WriteableBitmap is used as a fallback.
See Also