What is the purpose of the render method in an AppState?

What is the purpose of the render method in an AppState? Usually you just attach stuff into the root node and all that stuff will be rendered…



Thanks.

Yeah exactly, but you might want to do something at the render stage, physics debug draw happens in render() for example.

Ok, I see that in BulletAppState. But, why? Why is the physics update/step performed in the render method and not in the update method?

Thats the parallel update (multithreading), it makes sense because when the GPU is computing the scene the CPU is mainly sleeping, so why not compute the physics then?

1 Like