 |
SceneViewRenderToGpuBuffer Method |
Renders the current scene view to the bitmap and saves the image data a GpuBuffer that is passed to the specified stagingGpuBufferReady Action (parameters: GpuBuffer gpuBuffer, int imageWidth, int imageHeight).
The data in the GpuBuffer always have 4 bytes per pixel and have no row padding (stride = width * 4).
To render to a different size or different multi-sample or super-sampling count, create a new SceneView and call RenderToGpuBuffer there.
Namespace: Ab4d.SharpEngineAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntaxpublic void RenderToGpuBuffer(
bool renderNewFrame = true,
bool preserveGpuImage = true,
StandardBitmapFormats format = StandardBitmapFormats.Undefined,
Action<GpuBuffer, int, int>? stagingGpuImageReady = null
)
Parameters
- renderNewFrame Boolean (Optional)
- renders a new frame before creating a bitmap (true by default)
- preserveGpuImage Boolean (Optional)
- when true then the GpuImage is preserved for the next call of RenderToBitmap. When false then the used GpuImage is disposed before returning from this method. (false by default).
- format StandardBitmapFormats (Optional)
- format of the rendered bitmap (Undefined by default - in this case the value of the SceneView.Format is used)
- stagingGpuImageReady ActionGpuBuffer, Int32, Int32 (Optional)
- Action that will be called when the GpuBuffer is ready (action parameters: GpuBuffer gpuBuffer, int imageWidth, int imageHeight)
Remarks[Missing <remarks> documentation for "M:Ab4d.SharpEngine.SceneView.RenderToGpuBuffer(System.Boolean,System.Boolean,Ab4d.SharpEngine.Common.StandardBitmapFormats,System.Action{Ab4d.SharpEngine.Core.GpuBuffer,System.Int32,System.Int32})"]
See Also