diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/WorldMultiProgram.java b/src/main/java/com/jozufozu/flywheel/backend/core/FogMultiProgram.java similarity index 71% rename from src/main/java/com/jozufozu/flywheel/backend/core/WorldMultiProgram.java rename to src/main/java/com/jozufozu/flywheel/backend/core/FogMultiProgram.java index dfc822a9a..babe5d039 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/core/WorldMultiProgram.java +++ b/src/main/java/com/jozufozu/flywheel/backend/core/FogMultiProgram.java @@ -1,9 +1,7 @@ package com.jozufozu.flywheel.backend.core; -import java.util.ArrayList; import java.util.Collections; import java.util.EnumMap; -import java.util.List; import java.util.Map; import com.jozufozu.flywheel.backend.ShaderContext; @@ -17,14 +15,12 @@ import com.jozufozu.flywheel.backend.gl.shader.IMultiProgram; import com.jozufozu.flywheel.backend.gl.shader.ShaderSpecLoader; import com.jozufozu.flywheel.backend.loading.Program; -public class WorldMultiProgram
implements IMultiProgram
{ +public class FogMultiProgram
implements IMultiProgram
{
private final Map debugPrograms;
- public WorldMultiProgram(Map debugPrograms) {
+ public FogMultiProgram(Map implements IMultiProgram
@Override
public IMultiProgram create(ShaderLoader loader, ShaderContext ctx, ProgramSpec spec) {
- List debugModes = new ArrayList<>(2);
-
- String[] modes = new String[]{"NORMAL_DEBUG", "RAINBOW_DEBUG"};
-
- for (String mode : modes) {
- Program builder = ctx.loadProgram(loader, spec, Collections.singletonList(mode));
-
- debugModes.add(factory.create(builder, null));
- }
-
Map implements IMultiProgram
programs.put(fogMode, factory.create(builder, Collections.singletonList(fogMode)));
}
- return new WorldMultiProgram<>(programs, debugModes);
+ return new FogMultiProgram<>(programs);
}
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/WorldContext.java b/src/main/java/com/jozufozu/flywheel/backend/core/WorldContext.java
index a68515382..0bf84e0c9 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/WorldContext.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/core/WorldContext.java
@@ -32,8 +32,8 @@ public class WorldContext extends ShaderContext {
private static final String declaration = "#flwbuiltins";
private static final Pattern builtinPattern = Pattern.compile(declaration);
- public static final WorldContext {
@Nonnull
- P create(Program program, @Nullable List {
- /**
- * @param loader
- * @param ctx
- * @param spec
- * @return
- */
IMultiProgram create(ShaderLoader loader, ShaderContext ctx, ProgramSpec spec);
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java
index 8add8c3b1..5eb5331f7 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java
@@ -15,8 +15,8 @@ import java.util.stream.Stream;
import org.apache.commons.lang3.tuple.Pair;
import com.jozufozu.flywheel.backend.Backend;
+import com.jozufozu.flywheel.backend.core.FogMultiProgram;
import com.jozufozu.flywheel.backend.core.WorldContext;
-import com.jozufozu.flywheel.backend.core.WorldMultiProgram;
import com.jozufozu.flywheel.backend.loading.ModelTemplate;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllMovementBehaviours;
@@ -71,8 +71,8 @@ public class ContraptionRenderDispatcher {
public static final Compartment