chrono
chrono copied to clipboard
issue with irrlicht - black screen
When i try to run codes with IrrApp in while loop like:
while True:
system = chrono.ChSystemNSC()
# set simulation system
....
irr_app = irr.ChIrrApp(system, 'irr', irr.dimension2du(800, 600))
...
while irr_app.GetDevice().run():
irr_app.BeginScene()
irr_app.DrawAll()
system.DoStepDynamics(0.01)
irr_app.EndScene()
if system.GetChTime() > 10:
irr_app.GetDevice().closeDevice()
break
The rendering is correct at the first time(the first loop), and turn black in the following loops.
I'm not sure what sim_env is here. Are you sure you didn't mean to use if system.GetChTime() > 10:?
Sorry , i forget to change the name to system:ChSystemNSC()
What i want to do is restart the simulation after 10 seconds.