Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with irrlicht - black screen #192

Open
ZhiquanW opened this issue Oct 23, 2019 · 3 comments
Open

issue with irrlicht - black screen #192

ZhiquanW opened this issue Oct 23, 2019 · 3 comments

Comments

@ZhiquanW
Copy link

ZhiquanW commented Oct 23, 2019

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.

@rserban
Copy link
Member

rserban commented Oct 23, 2019

I'm not sure what sim_env is here. Are you sure you didn't mean to use if system.GetChTime() > 10:?

@ZhiquanW
Copy link
Author

Sorry , i forget to change the name to system:ChSystemNSC()

@ZhiquanW
Copy link
Author

What i want to do is restart the simulation after 10 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants