Click or drag to resize
Ab4d.SharpEngine logo

SharpEngineSceneViewRenderToBitmap(WriteableBitmap, Boolean) Method

RenderToBitmap method renders the current scene to the specified WinUI's WriteableBitmap. The size of the specified WriteableBitmap must be the same as the size of the SceneView or an exception will be thrown. See also the RenderToXXXX methods in the SceneView object.

Namespace: Ab4d.SharpEngine.WinUI
Assembly: Ab4d.SharpEngine.WinUI (in Ab4d.SharpEngine.WinUI.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public void RenderToBitmap(
	WriteableBitmap writeableBitmap,
	bool renderNewFrame = true
)

Parameters

writeableBitmap  WriteableBitmap
WriteableBitmap that will get the rendered scene
renderNewFrame  Boolean  (Optional)
true (by default) to always render a new frame

Return Value

true when the rendered scene was copied to the specified WriteableBitmap
Exceptions
ExceptionCondition
ArgumentExceptionArgumentException is thrown if the size of the specified WriteableBitmap is not the same as the size of the SceneView
See Also