Search in sources :

Example 1 with RenderPassesInitEvent

use of io.xol.chunkstories.api.events.rendering.RenderPassesInitEvent in project chunkstories by Hugobros3.

the class RenderingGraph method render.

public void render(RenderingInterface renderer) {
    if (shouldRebuildGraph) {
        RenderPassesInitEvent event = new RenderPassesInitEvent(this);
        renderer.getClient().getPluginManager().fireEvent(event);
        resolveGraphOrder();
        resolveInputs();
        shouldRebuildGraph = false;
        logger.debug("Printing resolved passes order:\n----------");
        if (executionOrder != null) {
            for (RenderPass pass : executionOrder) {
                logger.debug("pass:" + pass.name + pass.getClass().getName());
            }
        }
    }
    if (executionOrder != null) {
        for (RenderPass pass : executionOrder) {
            this.currentPassBeingRendered = pass;
            pass.render(renderer);
        }
    }
}
Also used : RenderPass(io.xol.chunkstories.api.rendering.pass.RenderPass) RenderPassesInitEvent(io.xol.chunkstories.api.events.rendering.RenderPassesInitEvent)

Aggregations

RenderPassesInitEvent (io.xol.chunkstories.api.events.rendering.RenderPassesInitEvent)1 RenderPass (io.xol.chunkstories.api.rendering.pass.RenderPass)1