 |
SceneViewResize(Int32, Int32, Int32, Single, SurfaceTransformFlagsKHR, Boolean) Method |
Resizes the SceneView. When the SceneView is not rendered to a
Surface, it is directly resized
to the specified size. When the SceneView is rendered to a
Surface and the surface provides
size information, the size from the surface is used and the provided dimensions are ignored. However, if the surface does
not provide size information, the provided dimensions are used as a fallback. This allows caller to
accommodate situations when rendering to a surface that does not provide size information (e.g., using
Silk.NET under Wayland on Linux).
Namespace: Ab4d.SharpEngineAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.0.9208+3b2441d6a11f923f2600f40f4296bdc3d8b46035
Syntaxpublic bool Resize(
int newWidth = -1,
int newHeight = -1,
int newMultisampleCount = -1,
float newSupersamplingCount = -1f,
SurfaceTransformFlagsKHR preTransform = SurfaceTransformFlagsKHR.Identity|SurfaceTransformFlagsKHR.Rotate90|SurfaceTransformFlagsKHR.Rotate180|SurfaceTransformFlagsKHR.Rotate270|SurfaceTransformFlagsKHR.HorizontalMirror|SurfaceTransformFlagsKHR.HorizontalMirrorRotate90|SurfaceTransformFlagsKHR.HorizontalMirrorRotate180|SurfaceTransformFlagsKHR.HorizontalMirrorRotate270|SurfaceTransformFlagsKHR.Inherit,
bool renderNextFrameAfterResize = true
)
Parameters
- newWidth Int32 (Optional)
- new width in pixels (when using DPI scale then the width of the client size that is reported by the UI framework may need to be multiplied by the DPI scale). Ignored when rendering to a surface that provides size information. When -1 (by default) then the current Width is used.
- newHeight Int32 (Optional)
- new height in pixels (when using DPI scale then the height of the client size that is reported by the UI framework may need to be multiplied by the DPI scale). Ignored when rendering to a surface that provides size information. When -1 (by default) then the current Height is used.
- newMultisampleCount Int32 (Optional)
- optional new multi-sample count; when -1 (by default) then existing MultisampleCount is used
- newSupersamplingCount Single (Optional)
- optional new super-sampling count; when -1 (by default) then existing SupersamplingCount is used
- preTransform SurfaceTransformFlagsKHR (Optional)
- pre-transform (None by default). Ignored when rendering to a surface.
- renderNextFrameAfterResize Boolean (Optional)
- true (by default) to render next frame after resizing
Return Value
Booleanfalse when no resize was needed because the size was already set
See Also