mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 06:24:29 +01:00
Compile everything on the fly
This commit is contained in:
parent
2b6348855a
commit
0b25335f8e
@ -4,12 +4,12 @@ import java.util.stream.Stream;
|
||||
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.backend.GameStateRegistry;
|
||||
import com.jozufozu.flywheel.backend.pipeline.ShaderPipeline;
|
||||
import com.jozufozu.flywheel.backend.pipeline.WorldShaderPipeline;
|
||||
import com.jozufozu.flywheel.backend.source.FileResolution;
|
||||
import com.jozufozu.flywheel.backend.source.Resolver;
|
||||
import com.jozufozu.flywheel.core.Templates;
|
||||
import com.jozufozu.flywheel.core.WorldContext;
|
||||
import com.jozufozu.flywheel.core.pipeline.PipelineCompiler;
|
||||
import com.jozufozu.flywheel.core.pipeline.WorldCompiler;
|
||||
import com.jozufozu.flywheel.event.GatherContextEvent;
|
||||
import com.jozufozu.flywheel.util.ResourceUtil;
|
||||
import com.simibubi.create.Create;
|
||||
@ -32,8 +32,8 @@ public class CreateContexts {
|
||||
GameStateRegistry.register(RainbowDebugStateProvider.INSTANCE);
|
||||
FileResolution header = Resolver.INSTANCE.findShader(ResourceUtil.subPath(CONTRAPTION, ".glsl"));
|
||||
|
||||
ShaderPipeline<ContraptionProgram> instancing = new WorldShaderPipeline<>(ContraptionProgram::new, Templates.INSTANCING, header);
|
||||
ShaderPipeline<ContraptionProgram> structure = new WorldShaderPipeline<>(ContraptionProgram::new, Templates.ONE_SHOT, header);
|
||||
PipelineCompiler<ContraptionProgram> instancing = new WorldCompiler<>(ContraptionProgram::new, Templates.INSTANCING, header);
|
||||
PipelineCompiler<ContraptionProgram> structure = new WorldCompiler<>(ContraptionProgram::new, Templates.ONE_SHOT, header);
|
||||
|
||||
CWORLD = backend.register(WorldContext.builder(backend, CONTRAPTION)
|
||||
.build(instancing));
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.simibubi.create.foundation.render;
|
||||
|
||||
import com.jozufozu.flywheel.core.shader.spec.BooleanStateProvider;
|
||||
import com.jozufozu.flywheel.core.shader.gamestate.IGameStateProvider;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.contraptions.KineticDebugger;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public class RainbowDebugStateProvider implements BooleanStateProvider {
|
||||
public class RainbowDebugStateProvider implements IGameStateProvider {
|
||||
|
||||
public static final RainbowDebugStateProvider INSTANCE = new RainbowDebugStateProvider();
|
||||
public static final ResourceLocation NAME = Create.asResource("rainbow_debug");
|
||||
|
@ -6,10 +6,7 @@
|
||||
"define": "DEBUG_RAINBOW"
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"provider": "flywheel:normal_debug",
|
||||
"value": "true"
|
||||
},
|
||||
"when": "flywheel:normal_debug",
|
||||
"define": "DEBUG_NORMAL"
|
||||
}
|
||||
]
|
||||
|
@ -2,10 +2,7 @@
|
||||
"source": "create:contraption_actor.vert",
|
||||
"states": [
|
||||
{
|
||||
"when": {
|
||||
"provider": "flywheel:normal_debug",
|
||||
"value": "true"
|
||||
},
|
||||
"when": "flywheel:normal_debug",
|
||||
"define": "DEBUG_NORMAL"
|
||||
}
|
||||
]
|
||||
|
@ -2,10 +2,7 @@
|
||||
"source": "create:flap.vert",
|
||||
"states": [
|
||||
{
|
||||
"when": {
|
||||
"provider": "flywheel:normal_debug",
|
||||
"value": "true"
|
||||
},
|
||||
"when": "flywheel:normal_debug",
|
||||
"define": "DEBUG_NORMAL"
|
||||
}
|
||||
]
|
||||
|
@ -2,10 +2,7 @@
|
||||
"source": "create:passthru.vert",
|
||||
"states": [
|
||||
{
|
||||
"when": {
|
||||
"provider": "flywheel:normal_debug",
|
||||
"value": "true"
|
||||
},
|
||||
"when": "flywheel:normal_debug",
|
||||
"define": "DEBUG_NORMAL"
|
||||
}
|
||||
]
|
||||
|
@ -6,10 +6,7 @@
|
||||
"define": "DEBUG_RAINBOW"
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"provider": "flywheel:normal_debug",
|
||||
"value": "true"
|
||||
},
|
||||
"when": "flywheel:normal_debug",
|
||||
"define": "DEBUG_NORMAL"
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user