|
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).
Namespace: Ab4d.SharpEngineAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public 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)
See Also