Sign in to follow this  
BrechtDebruyne

multithreading problem with Nvidia PhysX

Recommended Posts

[color=#333333]
'm having a multithreading problem with Nvidia PhysX. the SDK requires that you call Simulate() (starts computing new physics positions within a new thread) and FetchResults(waits 'till the physics computations are done). Inbetween Simulate() and FetchResults() you may not 'compute new physics'[/color][color=#333333]
It is proposed (in a sample) that we create a game loop as such:[/color][list]
[*]Logic (you may calculate physics here and other stuff)
[*]Render + Simulate() at start of Render call and FetchResults at end of Render() call
[/list][color=#333333]
However, this has given me various little errors that stack up: since you actually render the scene that was computed in the previous iteration in the game loop.[/color][color=#333333]
I wonder if there's a way around this? I've been trying and trying, but I can't think of a solution...[/color]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this