Skip to content

Commit 5d0c86f

Browse files
committed
Fix 3D cabview renderer not marking its shapes and textures
1 parent 84dcb4c commit 5d0c86f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,10 @@ internal override void Mark()
354354
foreach (var pdl in ParticleDrawers.Values)
355355
foreach (var pd in pdl)
356356
pd.Mark();
357-
if (_CabRenderer != null)
358-
_CabRenderer.Mark();
357+
358+
_CabRenderer?.Mark();
359+
ThreeDimentionCabViewer?.Mark();
360+
359361
base.Mark();
360362
}
361363

@@ -3058,9 +3060,13 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime)
30583060

30593061
internal override void Mark()
30603062
{
3061-
// TODO: This is likely wrong; we should mark textures, shapes and other graphical resources here.
3063+
TrainCarShape?.Mark();
3064+
foreach (ThreeDimCabDigit threeDimCabDigit in DigitParts3D.Values)
3065+
{
3066+
threeDimCabDigit.Mark();
3067+
}
30623068
}
3063-
} // Class ThreeDimentionCabViewer
3069+
}
30643070

30653071
public class ThreeDimCabDigit
30663072
{

0 commit comments

Comments
 (0)