-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed game not closing on window exit, added it so each window has th…
…eir own unique pipeline instance for individual render tasks
- Loading branch information
Showing
13 changed files
with
92 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/dev/hilligans/ourcraft/client/rendering/graphics/PipelineInstance.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package dev.hilligans.ourcraft.client.rendering.graphics; | ||
|
||
import dev.hilligans.ourcraft.GameInstance; | ||
import dev.hilligans.ourcraft.client.rendering.graphics.api.GraphicsContext; | ||
import dev.hilligans.ourcraft.client.rendering.graphics.api.IGraphicsElement; | ||
import dev.hilligans.ourcraft.client.rendering.graphics.api.IGraphicsEngine; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class PipelineInstance implements IGraphicsElement { | ||
|
||
|
||
public RenderPipeline renderPipeline; | ||
public ArrayList<RenderTask> tasks; | ||
|
||
public PipelineInstance(RenderPipeline renderPipeline, ArrayList<RenderTask> renderTasks) { | ||
this.renderPipeline = renderPipeline; | ||
this.tasks = renderTasks; | ||
} | ||
|
||
@Override | ||
public void load(GameInstance gameInstance, IGraphicsEngine<?, ?, ?> graphicsEngine, GraphicsContext graphicsContext) { | ||
for(RenderTask renderTask : tasks) { | ||
renderTask.load(gameInstance, graphicsEngine, graphicsContext); | ||
} | ||
} | ||
|
||
@Override | ||
public void cleanup(GameInstance gameInstance, IGraphicsEngine<?, ?, ?> graphicsEngine, GraphicsContext graphicsContext) { | ||
for(RenderTask renderTask : tasks) { | ||
renderTask.cleanup(gameInstance, graphicsEngine, graphicsContext); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters