Skip to content

Commit bf72b02

Browse files
committed
Updated code comment
1 parent 98d5499 commit bf72b02

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Ab4d.SharpEngine.Samples.Common/HitTesting/HitTestingWithIdBitmapSample.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,9 @@ private void RenderIdBitmap()
238238
_bitmapIdSceneView.Initialize(SceneView.Width, SceneView.Height, dpiScaleX: 1, dpiScaleY: 1, multisampleCount: 1, supersamplingCount: 1);
239239
_bitmapIdSceneView.BackgroundColor = Color4.TransparentBlack; // Set BackgroundColor to (0,0,0,0) so it will be different from actual objects that will have alpha set to 1.
240240

241-
// SharpEngine >= v3.2.9386 does not allow re-using a camera in a different scene view, so we need to
242-
// create a new instance, and sync its properties on each render pass.
241+
// Create a new TargetPositionCamera that will be used to render _bitmapIdSceneView.
242+
// This camera is sync with the main targetPositionCamera on each render pass (see code below).
243+
// Note that we cannot use one camera object on two different SceneView objects.
243244
_bitmapIdCamera = new TargetPositionCamera();
244245
_bitmapIdSceneView.Camera = _bitmapIdCamera;
245246
}

Ab4d.SharpEngine.Samples.Common/HitTesting/RectangularSelectionSample.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,9 @@ private void RenderIdBitmap()
616616
_bitmapIdSceneView.Initialize(SceneView.Width, SceneView.Height, dpiScaleX: 1, dpiScaleY: 1, multisampleCount: 1, supersamplingCount: 1);
617617
_bitmapIdSceneView.BackgroundColor = Color4.TransparentBlack; // Set BackgroundColor to (0,0,0,0) so it will be different from actual objects that will have alpha set to 1.
618618

619-
// SharpEngine >= v3.2.9386 does not allow re-using a camera in a different scene view, so we need to
620-
// create a new instance, and sync its properties on each render pass.
619+
// Create a new TargetPositionCamera that will be used to render _bitmapIdSceneView.
620+
// This camera is sync with the main targetPositionCamera on each render pass (see code below).
621+
// Note that we cannot use one camera object on two different SceneView objects.
621622
_bitmapIdCamera = new TargetPositionCamera();
622623
_bitmapIdSceneView.Camera = _bitmapIdCamera;
623624
}

0 commit comments

Comments
 (0)