I have a program that uses standard game and then attaches GameStateNodes in a heirarchy for client/server usage.
I am trying to use BloomRenderPass, but I dont really know what to do with the BloomRenderPass object. I thought it should go into a PassManager, but I don't know where that would go (my guess is it would go in a GameStateNode) and how to use it (again my guess is in the GameStateNodes render method).
If someone could give my a quick synopsis on how to set it up, I'd really appreciate it.
Thanks
Not sure how GameStateNodes work, as I tend to deal in extension of BaseGame and extension of the GameState classes, but if you put the BloomRenderPass object into a basic pass manager, then you have to render the basic pass manager in the render mathod…
Trussell said:
Not sure how GameStateNodes work, as I tend to deal in extension of BaseGame and extension of the GameState classes, but if you put the BloomRenderPass object into a basic pass manager, then you have to render the basic pass manager in the render mathod...
Ok, but I don't know which method from the BasicPassManager to call in my GameStateNode's render method.
You have to create BasicPassManager instance inside your state implementation to work with. You should also update and render passes maitain by this manager. To do that you should put appropriate code into update() and render() methods (if you are extending GameState) or put it into stateUpdate() and stateRender() if you are extending for example CameraGameState.
Sample Code:
class TestState extends GameState {
private BasicPassManager manager = new BasicPassManager();
....
....
....
public void update(float tpf){
rootNode.updateGeometricState(tpf,true);
manager.updatePasses(tpf);
}
public void render(float tpf){
display.getRenderer().draw(rootNode);
passManager.renderPasses(display.getRenderer());
}
If you set this you would be able to achive pass changes.
ok, that worked. thanks