mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-06 04:16:36 +01:00
Reorganization II
This commit is contained in:
parent
8cc32b49f2
commit
806e861edc
215 changed files with 575 additions and 1038 deletions
|
@ -4,21 +4,24 @@ import org.apache.maven.artifact.versioning.ArtifactVersion;
|
|||
import org.slf4j.Logger;
|
||||
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.backend.RenderWork;
|
||||
import com.jozufozu.flywheel.backend.ShadersModHandler;
|
||||
import com.jozufozu.flywheel.backend.engine.batching.DrawBuffer;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstancedRenderDispatcher;
|
||||
import com.jozufozu.flywheel.backend.instancing.batching.DrawBuffer;
|
||||
import com.jozufozu.flywheel.config.BackendTypeArgument;
|
||||
import com.jozufozu.flywheel.config.FlwCommands;
|
||||
import com.jozufozu.flywheel.config.FlwConfig;
|
||||
import com.jozufozu.flywheel.core.BackendTypes;
|
||||
import com.jozufozu.flywheel.core.Components;
|
||||
import com.jozufozu.flywheel.core.PartialModel;
|
||||
import com.jozufozu.flywheel.core.QuadConverter;
|
||||
import com.jozufozu.flywheel.core.StitchedSprite;
|
||||
import com.jozufozu.flywheel.core.model.Models;
|
||||
import com.jozufozu.flywheel.event.EntityWorldHandler;
|
||||
import com.jozufozu.flywheel.event.ForgeEvents;
|
||||
import com.jozufozu.flywheel.handler.EntityWorldHandler;
|
||||
import com.jozufozu.flywheel.handler.ForgeEvents;
|
||||
import com.jozufozu.flywheel.lib.backend.BackendTypes;
|
||||
import com.jozufozu.flywheel.lib.context.Contexts;
|
||||
import com.jozufozu.flywheel.lib.format.Formats;
|
||||
import com.jozufozu.flywheel.lib.material.Materials;
|
||||
import com.jozufozu.flywheel.lib.model.Models;
|
||||
import com.jozufozu.flywheel.lib.model.PartialModel;
|
||||
import com.jozufozu.flywheel.lib.pipeline.Pipelines;
|
||||
import com.jozufozu.flywheel.lib.struct.StructTypes;
|
||||
import com.jozufozu.flywheel.lib.util.QuadConverter;
|
||||
import com.jozufozu.flywheel.lib.util.RenderWork;
|
||||
import com.jozufozu.flywheel.lib.util.ShadersModHandler;
|
||||
import com.jozufozu.flywheel.mixin.PausedPartialTickAccessor;
|
||||
import com.jozufozu.flywheel.vanilla.VanillaInstances;
|
||||
import com.mojang.logging.LogUtils;
|
||||
|
@ -98,13 +101,15 @@ public class Flywheel {
|
|||
|
||||
modEventBus.addListener(PartialModel::onModelRegistry);
|
||||
modEventBus.addListener(PartialModel::onModelBake);
|
||||
modEventBus.addListener(StitchedSprite::onTextureStitchPre);
|
||||
modEventBus.addListener(StitchedSprite::onTextureStitchPost);
|
||||
|
||||
// forgeEventBus.addListener(ExampleEffect::tick);
|
||||
// forgeEventBus.addListener(ExampleEffect::onReload);
|
||||
|
||||
Components.init();
|
||||
Formats.init();
|
||||
StructTypes.init();
|
||||
Materials.init();
|
||||
Contexts.init();
|
||||
Pipelines.init();
|
||||
|
||||
VanillaInstances.init();
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package com.jozufozu.flywheel.backend;
|
||||
package com.jozufozu.flywheel.api.backend;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.jozufozu.flywheel.backend.instancing.Engine;
|
||||
import com.jozufozu.flywheel.core.pipeline.SimplePipeline;
|
||||
import com.jozufozu.flywheel.api.pipeline.Pipeline;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
||||
|
@ -21,5 +20,5 @@ public interface BackendType {
|
|||
|
||||
boolean supported();
|
||||
|
||||
@Nullable SimplePipeline pipelineShader();
|
||||
@Nullable Pipeline pipelineShader();
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
package com.jozufozu.flywheel.api.backend;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jozufozu.flywheel.api.instancer.InstancerManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstanceManager;
|
||||
|
||||
public interface Engine extends RenderDispatcher, InstancerManager {
|
||||
void attachManagers(InstanceManager<?>... listener);
|
|
@ -1,7 +1,8 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
package com.jozufozu.flywheel.api.backend;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.core.RenderContext;
|
||||
import com.jozufozu.flywheel.api.event.RenderContext;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.task.TaskExecutor;
|
||||
|
||||
import net.minecraft.client.Camera;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.core;
|
||||
package com.jozufozu.flywheel.api.component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.core;
|
||||
package com.jozufozu.flywheel.api.component;
|
||||
|
||||
public enum ComponentType {
|
||||
MATERIAL,
|
|
@ -1,6 +1,4 @@
|
|||
package com.jozufozu.flywheel.event;
|
||||
|
||||
import com.jozufozu.flywheel.core.RenderContext;
|
||||
package com.jozufozu.flywheel.api.event;
|
||||
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.event;
|
||||
package com.jozufozu.flywheel.api.event;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.core;
|
||||
package com.jozufozu.flywheel.api.event;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.joml.FrustumIntersection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.api;
|
||||
package com.jozufozu.flywheel.api.event;
|
||||
|
||||
public enum RenderStage {
|
||||
BEFORE_SKY,
|
|
@ -1,7 +1,5 @@
|
|||
package com.jozufozu.flywheel.event;
|
||||
package com.jozufozu.flywheel.api.event;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.core.RenderContext;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Matrix4f;
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.api.instance;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -1,6 +1,4 @@
|
|||
package com.jozufozu.flywheel.core.structs;
|
||||
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
package com.jozufozu.flywheel.api.instancer;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.BlockAndTintGetter;
|
|
@ -1,8 +1,8 @@
|
|||
package com.jozufozu.flywheel.api.instancer;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.model.Model;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.core.model.Model;
|
||||
|
||||
import net.minecraft.core.Vec3i;
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package com.jozufozu.flywheel.core.layout;
|
||||
package com.jozufozu.flywheel.api.layout;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
||||
import com.jozufozu.flywheel.gl.array.VertexAttribute;
|
||||
import com.jozufozu.flywheel.lib.layout.LayoutItem;
|
||||
|
||||
/**
|
||||
* Classic Vertex Format struct with a clever name.
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.core.layout;
|
||||
package com.jozufozu.flywheel.api.layout;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.jozufozu.flywheel.core.model;
|
||||
package com.jozufozu.flywheel.api.model;
|
||||
|
||||
import org.joml.Vector4fc;
|
||||
|
||||
import com.jozufozu.flywheel.api.vertex.MutableVertexList;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
||||
import com.jozufozu.flywheel.backend.instancing.instancing.ElementBuffer;
|
||||
import com.jozufozu.flywheel.core.QuadConverter;
|
||||
import com.jozufozu.flywheel.backend.engine.instancing.ElementBuffer;
|
||||
import com.jozufozu.flywheel.lib.util.QuadConverter;
|
||||
|
||||
/**
|
||||
* A holder for arbitrary vertex data that can be written to memory or a vertex list.
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.core.model;
|
||||
package com.jozufozu.flywheel.api.model;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.api;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -2,7 +2,6 @@ package com.jozufozu.flywheel.api.pipeline;
|
|||
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.gl.GLSLVersion;
|
||||
import com.jozufozu.flywheel.glsl.ShaderSources;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.core;
|
||||
package com.jozufozu.flywheel.api.pipeline;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package com.jozufozu.flywheel.api.struct;
|
||||
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.layout.BufferLayout;
|
||||
import com.jozufozu.flywheel.api.vertex.MutableVertexList;
|
||||
import com.jozufozu.flywheel.core.layout.BufferLayout;
|
||||
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.api.struct;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
package com.jozufozu.flywheel.api.task;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.jozufozu.flywheel.api.vertex;
|
||||
|
||||
import com.jozufozu.flywheel.core.vertex.InferredVertexListProviderImpl;
|
||||
import com.jozufozu.flywheel.backend.vertex.InferredVertexListProviderImpl;
|
||||
import com.jozufozu.flywheel.extension.VertexFormatExtension;
|
||||
import com.mojang.blaze3d.vertex.VertexFormat;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.jozufozu.flywheel.api.vertex;
|
||||
|
||||
import com.jozufozu.flywheel.core.layout.BufferLayout;
|
||||
import com.jozufozu.flywheel.api.layout.BufferLayout;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.api.vertex;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -5,9 +5,11 @@ import org.jetbrains.annotations.Nullable;
|
|||
import org.slf4j.Logger;
|
||||
|
||||
import com.jozufozu.flywheel.api.FlywheelLevel;
|
||||
import com.jozufozu.flywheel.backend.instancing.ParallelTaskExecutor;
|
||||
import com.jozufozu.flywheel.api.backend.BackendType;
|
||||
import com.jozufozu.flywheel.backend.task.ParallelTaskExecutor;
|
||||
import com.jozufozu.flywheel.config.FlwConfig;
|
||||
import com.jozufozu.flywheel.core.BackendTypes;
|
||||
import com.jozufozu.flywheel.lib.backend.BackendTypes;
|
||||
import com.jozufozu.flywheel.lib.util.RenderWork;
|
||||
import com.mojang.logging.LogUtils;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.jozufozu.flywheel.backend;
|
||||
|
||||
import com.jozufozu.flywheel.backend.compile.FlwCompiler;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstancedRenderDispatcher;
|
||||
import com.jozufozu.flywheel.backend.instancing.compile.FlwCompiler;
|
||||
import com.jozufozu.flywheel.glsl.ShaderSources;
|
||||
import com.jozufozu.flywheel.glsl.error.ErrorReporter;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
|
@ -9,8 +9,8 @@ import java.util.stream.Collectors;
|
|||
import org.jetbrains.annotations.NotNull;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
|
||||
import com.jozufozu.flywheel.api.pipeline.SourceComponent;
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.gl.GLSLVersion;
|
||||
import com.jozufozu.flywheel.gl.shader.GlShader;
|
||||
import com.jozufozu.flywheel.gl.shader.ShaderType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.GL_TRUE;
|
||||
import static org.lwjgl.opengl.GL20.GL_LINK_STATUS;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.jozufozu.flywheel.api.component.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.core.ComponentRegistry;
|
||||
|
||||
public class CullingContextSet {
|
||||
static CullingContextSet create() {
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import static org.lwjgl.opengl.GL20.glAttachShader;
|
||||
import static org.lwjgl.opengl.GL20.glCreateProgram;
|
||||
|
@ -12,17 +12,15 @@ import java.util.stream.Collectors;
|
|||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.jozufozu.flywheel.Flywheel;
|
||||
import com.jozufozu.flywheel.api.component.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.api.context.Context;
|
||||
import com.jozufozu.flywheel.api.pipeline.Pipeline;
|
||||
import com.jozufozu.flywheel.api.pipeline.SourceComponent;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.api.uniform.ShaderUniforms;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.backend.instancing.indirect.IndirectComponent;
|
||||
import com.jozufozu.flywheel.core.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.core.Pipelines;
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.core.context.SimpleContext;
|
||||
import com.jozufozu.flywheel.core.pipeline.SimplePipeline;
|
||||
import com.jozufozu.flywheel.backend.engine.indirect.IndirectComponent;
|
||||
import com.jozufozu.flywheel.gl.GLSLVersion;
|
||||
import com.jozufozu.flywheel.gl.shader.GlProgram;
|
||||
import com.jozufozu.flywheel.gl.shader.ShaderType;
|
||||
|
@ -30,6 +28,7 @@ import com.jozufozu.flywheel.glsl.ShaderLoadingException;
|
|||
import com.jozufozu.flywheel.glsl.ShaderSources;
|
||||
import com.jozufozu.flywheel.glsl.generate.FnSignature;
|
||||
import com.jozufozu.flywheel.glsl.generate.GlslExpr;
|
||||
import com.jozufozu.flywheel.lib.pipeline.Pipelines;
|
||||
import com.jozufozu.flywheel.util.StringUtil;
|
||||
|
||||
public class FlwCompiler {
|
||||
|
@ -126,7 +125,7 @@ public class FlwCompiler {
|
|||
shaderCompiler.delete();
|
||||
}
|
||||
|
||||
public GlProgram getPipelineProgram(VertexType vertexType, StructType<?> structType, SimpleContext contextShader, SimplePipeline pipelineShader) {
|
||||
public GlProgram getPipelineProgram(VertexType vertexType, StructType<?> structType, Context contextShader, Pipeline pipelineShader) {
|
||||
return pipelinePrograms.get(new PipelineContext(vertexType, structType, contextShader, pipelineShader));
|
||||
}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.api.pipeline.SourceComponent;
|
||||
|
||||
/**
|
||||
* A component of a ShaderCompiler, responsible for expanding root sources into the complete set of included sources.
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
|||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.api.pipeline.SourceComponent;
|
||||
import com.jozufozu.flywheel.glsl.ShaderSources;
|
||||
import com.jozufozu.flywheel.glsl.generate.FnSignature;
|
||||
import com.jozufozu.flywheel.glsl.generate.GlslBlock;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import com.jozufozu.flywheel.api.context.Context;
|
||||
import com.jozufozu.flywheel.api.pipeline.Pipeline;
|
|
@ -1,24 +1,24 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.jozufozu.flywheel.api.component.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.api.context.Context;
|
||||
import com.jozufozu.flywheel.api.pipeline.Pipeline;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
||||
import com.jozufozu.flywheel.core.BackendTypes;
|
||||
import com.jozufozu.flywheel.core.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.core.Components;
|
||||
import com.jozufozu.flywheel.core.context.SimpleContext;
|
||||
import com.jozufozu.flywheel.core.pipeline.SimplePipeline;
|
||||
import com.jozufozu.flywheel.lib.backend.BackendTypes;
|
||||
import com.jozufozu.flywheel.lib.context.Contexts;
|
||||
|
||||
public class PipelineContextSet {
|
||||
static PipelineContextSet create() {
|
||||
var builder = new PipelineContextSet();
|
||||
for (SimplePipeline pipelineShader : BackendTypes.availablePipelineShaders()) {
|
||||
for (Pipeline pipelineShader : BackendTypes.availablePipelineShaders()) {
|
||||
for (StructType<?> structType : ComponentRegistry.structTypes) {
|
||||
for (VertexType vertexType : ComponentRegistry.vertexTypes) {
|
||||
builder.add(vertexType, structType, Components.WORLD, pipelineShader);
|
||||
builder.add(vertexType, structType, Contexts.WORLD, pipelineShader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ public class PipelineContextSet {
|
|||
return contexts.size();
|
||||
}
|
||||
|
||||
private void add(VertexType vertexType, StructType<?> structType, SimpleContext world, SimplePipeline pipelineShader) {
|
||||
private void add(VertexType vertexType, StructType<?> structType, Context world, Pipeline pipelineShader) {
|
||||
var ctx = new PipelineContext(vertexType, structType, world, pipelineShader);
|
||||
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.api.pipeline.SourceComponent;
|
||||
|
||||
public class RecursiveIncluder implements Includer {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
|
|||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.api.pipeline.SourceComponent;
|
||||
import com.jozufozu.flywheel.gl.GLSLVersion;
|
||||
import com.jozufozu.flywheel.gl.shader.GlShader;
|
||||
import com.jozufozu.flywheel.gl.shader.ShaderType;
|
|
@ -1,9 +1,9 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.api.pipeline.SourceComponent;
|
||||
import com.jozufozu.flywheel.util.ResourceUtil;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
|
@ -1,11 +1,11 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
package com.jozufozu.flywheel.backend.compile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.api.pipeline.SourceComponent;
|
||||
import com.jozufozu.flywheel.glsl.ShaderSources;
|
||||
import com.jozufozu.flywheel.glsl.SourceFile;
|
||||
import com.jozufozu.flywheel.glsl.generate.GlslBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.batching;
|
||||
package com.jozufozu.flywheel.backend.engine.batching;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -9,10 +9,10 @@ import org.jetbrains.annotations.Nullable;
|
|||
import org.lwjgl.system.MemoryUtil;
|
||||
|
||||
import com.jozufozu.flywheel.Flywheel;
|
||||
import com.jozufozu.flywheel.api.model.Mesh;
|
||||
import com.jozufozu.flywheel.api.vertex.ReusableVertexList;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexListProvider;
|
||||
import com.jozufozu.flywheel.backend.memory.MemoryBlock;
|
||||
import com.jozufozu.flywheel.core.model.Mesh;
|
||||
import com.jozufozu.flywheel.lib.memory.MemoryBlock;
|
||||
import com.mojang.blaze3d.vertex.VertexFormat;
|
||||
|
||||
public class BatchedMeshPool {
|
|
@ -1,11 +1,11 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.batching;
|
||||
package com.jozufozu.flywheel.backend.engine.batching;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.extension.BufferBuilderExtension;
|
||||
import com.jozufozu.flywheel.extension.RenderTypeExtension;
|
||||
import com.mojang.blaze3d.vertex.BufferBuilder;
|
|
@ -1,16 +1,16 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.batching;
|
||||
package com.jozufozu.flywheel.backend.engine.batching;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.backend.Engine;
|
||||
import com.jozufozu.flywheel.api.event.RenderContext;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.instancer.Instancer;
|
||||
import com.jozufozu.flywheel.api.model.Model;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.backend.instancing.Engine;
|
||||
import com.jozufozu.flywheel.api.task.TaskExecutor;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstanceManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.TaskExecutor;
|
||||
import com.jozufozu.flywheel.core.RenderContext;
|
||||
import com.jozufozu.flywheel.core.model.Model;
|
||||
import com.jozufozu.flywheel.util.FlwUtil;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.batching;
|
||||
package com.jozufozu.flywheel.backend.engine.batching;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
@ -14,13 +14,13 @@ import org.jetbrains.annotations.NotNull;
|
|||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.ImmutableListMultimap;
|
||||
import com.google.common.collect.ListMultimap;
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.instancer.Instancer;
|
||||
import com.jozufozu.flywheel.api.model.Mesh;
|
||||
import com.jozufozu.flywheel.api.model.Model;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstancerKey;
|
||||
import com.jozufozu.flywheel.core.model.Mesh;
|
||||
import com.jozufozu.flywheel.core.model.Model;
|
||||
import com.mojang.blaze3d.vertex.VertexFormat;
|
||||
|
||||
import net.minecraft.client.renderer.RenderType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.batching;
|
||||
package com.jozufozu.flywheel.backend.engine.batching;
|
||||
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
|
@ -1,14 +1,14 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.batching;
|
||||
package com.jozufozu.flywheel.backend.engine.batching;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.jozufozu.flywheel.api.event.ReloadRenderersEvent;
|
||||
import com.jozufozu.flywheel.api.vertex.ReusableVertexList;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexListProvider;
|
||||
import com.jozufozu.flywheel.backend.memory.MemoryBlock;
|
||||
import com.jozufozu.flywheel.event.ReloadRenderersEvent;
|
||||
import com.jozufozu.flywheel.extension.BufferBuilderExtension;
|
||||
import com.jozufozu.flywheel.lib.memory.MemoryBlock;
|
||||
import com.mojang.blaze3d.vertex.VertexFormat;
|
||||
|
||||
import net.minecraft.client.renderer.RenderType;
|
|
@ -1,11 +1,11 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.batching;
|
||||
package com.jozufozu.flywheel.backend.engine.batching;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexListProvider;
|
||||
import com.mojang.blaze3d.vertex.VertexFormat;
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.batching;
|
||||
package com.jozufozu.flywheel.backend.engine.batching;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.material.Material;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.api.task.TaskExecutor;
|
||||
import com.jozufozu.flywheel.api.vertex.MutableVertexList;
|
||||
import com.jozufozu.flywheel.api.vertex.ReusableVertexList;
|
||||
import com.jozufozu.flywheel.backend.instancing.TaskExecutor;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Matrix3f;
|
||||
import com.mojang.math.Matrix4f;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
package com.jozufozu.flywheel.backend.engine.indirect;
|
||||
|
||||
import static org.lwjgl.opengl.GL15.glBindBuffer;
|
||||
import static org.lwjgl.opengl.GL15.glDeleteBuffers;
|
||||
|
@ -21,8 +21,8 @@ import static org.lwjgl.opengl.GL45.nglNamedBufferSubData;
|
|||
import org.lwjgl.system.MemoryUtil;
|
||||
import org.lwjgl.system.Pointer;
|
||||
|
||||
import com.jozufozu.flywheel.backend.memory.FlwMemoryTracker;
|
||||
import com.jozufozu.flywheel.backend.memory.MemoryBlock;
|
||||
import com.jozufozu.flywheel.lib.memory.FlwMemoryTracker;
|
||||
import com.jozufozu.flywheel.lib.memory.MemoryBlock;
|
||||
|
||||
public class IndirectBuffers {
|
||||
public static final int BUFFER_COUNT = 4;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
package com.jozufozu.flywheel.backend.engine.indirect;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
@ -6,16 +6,16 @@ import java.util.List;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.jozufozu.flywheel.Flywheel;
|
||||
import com.jozufozu.flywheel.api.pipeline.Pipeline;
|
||||
import com.jozufozu.flywheel.api.pipeline.SourceComponent;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.core.Pipelines;
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.core.layout.LayoutItem;
|
||||
import com.jozufozu.flywheel.glsl.ShaderSources;
|
||||
import com.jozufozu.flywheel.glsl.SourceFile;
|
||||
import com.jozufozu.flywheel.glsl.generate.FnSignature;
|
||||
import com.jozufozu.flywheel.glsl.generate.GlslBlock;
|
||||
import com.jozufozu.flywheel.glsl.generate.GlslBuilder;
|
||||
import com.jozufozu.flywheel.glsl.generate.GlslExpr;
|
||||
import com.jozufozu.flywheel.lib.layout.LayoutItem;
|
||||
import com.jozufozu.flywheel.lib.pipeline.Pipelines;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
package com.jozufozu.flywheel.backend.engine.indirect;
|
||||
|
||||
import static org.lwjgl.opengl.GL30.glBindVertexArray;
|
||||
import static org.lwjgl.opengl.GL30.glDeleteVertexArrays;
|
||||
|
@ -11,15 +11,15 @@ import static org.lwjgl.opengl.GL45.glEnableVertexArrayAttrib;
|
|||
import static org.lwjgl.opengl.GL45.glVertexArrayElementBuffer;
|
||||
import static org.lwjgl.opengl.GL45.glVertexArrayVertexBuffer;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
||||
import com.jozufozu.flywheel.backend.instancing.compile.FlwCompiler;
|
||||
import com.jozufozu.flywheel.core.Components;
|
||||
import com.jozufozu.flywheel.core.Pipelines;
|
||||
import com.jozufozu.flywheel.core.QuadConverter;
|
||||
import com.jozufozu.flywheel.backend.compile.FlwCompiler;
|
||||
import com.jozufozu.flywheel.gl.shader.GlProgram;
|
||||
import com.jozufozu.flywheel.lib.context.Contexts;
|
||||
import com.jozufozu.flywheel.lib.pipeline.Pipelines;
|
||||
import com.jozufozu.flywheel.lib.util.QuadConverter;
|
||||
|
||||
public class IndirectCullingGroup<T extends InstancedPart> {
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class IndirectCullingGroup<T extends InstancedPart> {
|
|||
setupVertexArray();
|
||||
|
||||
compute = FlwCompiler.INSTANCE.getCullingProgram(structType);
|
||||
draw = FlwCompiler.INSTANCE.getPipelineProgram(vertexType, structType, Components.WORLD, Pipelines.INDIRECT);
|
||||
draw = FlwCompiler.INSTANCE.getPipelineProgram(vertexType, structType, Contexts.WORLD, Pipelines.INDIRECT);
|
||||
}
|
||||
|
||||
private void setupVertexArray() {
|
|
@ -1,11 +1,11 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
package com.jozufozu.flywheel.backend.engine.indirect;
|
||||
|
||||
import org.lwjgl.system.MemoryUtil;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.component.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.material.Material;
|
||||
import com.jozufozu.flywheel.core.ComponentRegistry;
|
||||
|
||||
public final class IndirectDraw<T extends InstancedPart> {
|
||||
private final IndirectInstancer<T> instancer;
|
|
@ -1,17 +1,17 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
package com.jozufozu.flywheel.backend.engine.indirect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.instancer.Instancer;
|
||||
import com.jozufozu.flywheel.api.model.Model;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstancerKey;
|
||||
import com.jozufozu.flywheel.core.model.Model;
|
||||
import com.jozufozu.flywheel.util.Pair;
|
||||
|
||||
public class IndirectDrawManager {
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
package com.jozufozu.flywheel.backend.engine.indirect;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.GL_TRIANGLES;
|
||||
import static org.lwjgl.opengl.GL11.GL_UNSIGNED_INT;
|
||||
|
@ -10,10 +10,10 @@ import java.util.EnumMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.component.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.material.Material;
|
||||
import com.jozufozu.flywheel.core.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.util.Textures;
|
||||
|
||||
public class IndirectDrawSet<T extends InstancedPart> {
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
package com.jozufozu.flywheel.backend.engine.indirect;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -6,16 +6,16 @@ import java.util.Set;
|
|||
|
||||
import org.lwjgl.opengl.GL32;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.backend.Engine;
|
||||
import com.jozufozu.flywheel.api.context.Context;
|
||||
import com.jozufozu.flywheel.api.event.RenderContext;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.instancer.Instancer;
|
||||
import com.jozufozu.flywheel.api.model.Model;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.backend.instancing.Engine;
|
||||
import com.jozufozu.flywheel.api.task.TaskExecutor;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstanceManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.TaskExecutor;
|
||||
import com.jozufozu.flywheel.core.RenderContext;
|
||||
import com.jozufozu.flywheel.core.context.SimpleContext;
|
||||
import com.jozufozu.flywheel.core.model.Model;
|
||||
import com.jozufozu.flywheel.gl.GlStateTracker;
|
||||
import com.jozufozu.flywheel.gl.GlTextureUnit;
|
||||
import com.jozufozu.flywheel.util.FlwUtil;
|
||||
|
@ -37,12 +37,12 @@ public class IndirectEngine implements Engine {
|
|||
*/
|
||||
private final Set<InstanceManager<?>> instanceManagers = FlwUtil.createWeakHashSet();
|
||||
|
||||
protected final SimpleContext context;
|
||||
protected final Context context;
|
||||
protected final int sqrMaxOriginDistance;
|
||||
|
||||
protected BlockPos originCoordinate = BlockPos.ZERO;
|
||||
|
||||
public IndirectEngine(SimpleContext context, int sqrMaxOriginDistance) {
|
||||
public IndirectEngine(Context context, int sqrMaxOriginDistance) {
|
||||
this.context = context;
|
||||
this.sqrMaxOriginDistance = sqrMaxOriginDistance;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
package com.jozufozu.flywheel.backend.engine.indirect;
|
||||
|
||||
import org.lwjgl.system.MemoryUtil;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
package com.jozufozu.flywheel.backend.engine.indirect;
|
||||
|
||||
import static org.lwjgl.opengl.GL15.glDeleteBuffers;
|
||||
import static org.lwjgl.opengl.GL44.GL_DYNAMIC_STORAGE_BIT;
|
||||
|
@ -13,9 +13,9 @@ import java.util.Map;
|
|||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.jozufozu.flywheel.api.model.Mesh;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
||||
import com.jozufozu.flywheel.backend.memory.MemoryBlock;
|
||||
import com.jozufozu.flywheel.core.model.Mesh;
|
||||
import com.jozufozu.flywheel.lib.memory.MemoryBlock;
|
||||
|
||||
public class IndirectMeshPool {
|
||||
private final VertexType vertexType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
package com.jozufozu.flywheel.backend.engine.indirect;
|
||||
|
||||
import com.jozufozu.flywheel.api.material.Material;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.instancing;
|
||||
package com.jozufozu.flywheel.backend.engine.instancing;
|
||||
|
||||
import com.jozufozu.flywheel.api.material.Material;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.instancing;
|
||||
package com.jozufozu.flywheel.backend.engine.instancing;
|
||||
|
||||
import com.jozufozu.flywheel.gl.buffer.GlBufferType;
|
||||
import com.mojang.blaze3d.vertex.VertexFormat;
|
|
@ -1,14 +1,14 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.instancing;
|
||||
package com.jozufozu.flywheel.backend.engine.instancing;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.jozufozu.flywheel.Flywheel;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.layout.BufferLayout;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.api.struct.StructWriter;
|
||||
import com.jozufozu.flywheel.backend.instancing.AbstractInstancer;
|
||||
import com.jozufozu.flywheel.core.layout.BufferLayout;
|
||||
import com.jozufozu.flywheel.gl.array.GlVertexArray;
|
||||
import com.jozufozu.flywheel.gl.buffer.GlBuffer;
|
||||
import com.jozufozu.flywheel.gl.buffer.GlBufferType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.instancing;
|
||||
package com.jozufozu.flywheel.backend.engine.instancing;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -6,12 +6,12 @@ import java.util.List;
|
|||
|
||||
import com.jozufozu.flywheel.Flywheel;
|
||||
import com.jozufozu.flywheel.api.pipeline.Pipeline;
|
||||
import com.jozufozu.flywheel.core.SourceComponent;
|
||||
import com.jozufozu.flywheel.core.layout.LayoutItem;
|
||||
import com.jozufozu.flywheel.api.pipeline.SourceComponent;
|
||||
import com.jozufozu.flywheel.glsl.generate.FnSignature;
|
||||
import com.jozufozu.flywheel.glsl.generate.GlslBlock;
|
||||
import com.jozufozu.flywheel.glsl.generate.GlslBuilder;
|
||||
import com.jozufozu.flywheel.glsl.generate.GlslExpr;
|
||||
import com.jozufozu.flywheel.lib.layout.LayoutItem;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.instancing;
|
||||
package com.jozufozu.flywheel.backend.engine.instancing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -11,8 +11,8 @@ import org.jetbrains.annotations.Nullable;
|
|||
import org.lwjgl.opengl.GL32;
|
||||
|
||||
import com.jozufozu.flywheel.Flywheel;
|
||||
import com.jozufozu.flywheel.api.model.Mesh;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
||||
import com.jozufozu.flywheel.core.model.Mesh;
|
||||
import com.jozufozu.flywheel.gl.GlPrimitive;
|
||||
import com.jozufozu.flywheel.gl.array.GlVertexArray;
|
||||
import com.jozufozu.flywheel.gl.buffer.GlBuffer;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.instancing;
|
||||
package com.jozufozu.flywheel.backend.engine.instancing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
@ -13,14 +13,14 @@ import org.jetbrains.annotations.NotNull;
|
|||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.ImmutableListMultimap;
|
||||
import com.google.common.collect.ListMultimap;
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.instancer.Instancer;
|
||||
import com.jozufozu.flywheel.api.model.Mesh;
|
||||
import com.jozufozu.flywheel.api.model.Model;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstancerKey;
|
||||
import com.jozufozu.flywheel.core.model.Mesh;
|
||||
import com.jozufozu.flywheel.core.model.Model;
|
||||
|
||||
public class InstancingDrawManager {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.instancing;
|
||||
package com.jozufozu.flywheel.backend.engine.instancing;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -6,21 +6,21 @@ import java.util.Set;
|
|||
|
||||
import org.lwjgl.opengl.GL32;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.backend.Engine;
|
||||
import com.jozufozu.flywheel.api.component.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.api.context.Context;
|
||||
import com.jozufozu.flywheel.api.event.RenderContext;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.instancer.Instancer;
|
||||
import com.jozufozu.flywheel.api.model.Model;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.backend.instancing.Engine;
|
||||
import com.jozufozu.flywheel.api.task.TaskExecutor;
|
||||
import com.jozufozu.flywheel.backend.compile.FlwCompiler;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstanceManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.TaskExecutor;
|
||||
import com.jozufozu.flywheel.backend.instancing.compile.FlwCompiler;
|
||||
import com.jozufozu.flywheel.core.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.core.Pipelines;
|
||||
import com.jozufozu.flywheel.core.RenderContext;
|
||||
import com.jozufozu.flywheel.core.context.SimpleContext;
|
||||
import com.jozufozu.flywheel.core.model.Model;
|
||||
import com.jozufozu.flywheel.gl.GlStateTracker;
|
||||
import com.jozufozu.flywheel.gl.GlTextureUnit;
|
||||
import com.jozufozu.flywheel.lib.pipeline.Pipelines;
|
||||
import com.jozufozu.flywheel.util.FlwUtil;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
|
@ -40,12 +40,12 @@ public class InstancingEngine implements Engine {
|
|||
*/
|
||||
private final Set<InstanceManager<?>> instanceManagers = FlwUtil.createWeakHashSet();
|
||||
|
||||
protected final SimpleContext context;
|
||||
protected final Context context;
|
||||
protected final int sqrMaxOriginDistance;
|
||||
|
||||
protected BlockPos originCoordinate = BlockPos.ZERO;
|
||||
|
||||
public InstancingEngine(SimpleContext context, int sqrMaxOriginDistance) {
|
||||
public InstancingEngine(Context context, int sqrMaxOriginDistance) {
|
||||
this.context = context;
|
||||
this.sqrMaxOriginDistance = sqrMaxOriginDistance;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing.instancing;
|
||||
package com.jozufozu.flywheel.backend.engine.instancing;
|
||||
|
||||
import com.jozufozu.flywheel.api.material.Material;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
|
@ -6,9 +6,9 @@ import java.util.stream.Stream;
|
|||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||
import com.jozufozu.flywheel.api.instance.Instance;
|
||||
import com.jozufozu.flywheel.api.instance.TickableInstance;
|
||||
import com.jozufozu.flywheel.api.instancer.FlatLit;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancerManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstanceManager;
|
||||
import com.jozufozu.flywheel.core.structs.FlatLit;
|
||||
import com.jozufozu.flywheel.light.LightListener;
|
||||
import com.jozufozu.flywheel.util.box.ImmutableBox;
|
||||
|
||||
|
@ -50,7 +50,7 @@ public abstract class AbstractInstance implements Instance, LightListener {
|
|||
/**
|
||||
* Free any acquired resources.
|
||||
*/
|
||||
protected abstract void remove();
|
||||
public abstract void remove();
|
||||
|
||||
/**
|
||||
* Update instance data here. Good for when data doesn't change very often and when animations are GPU based.
|
||||
|
|
|
@ -9,14 +9,16 @@ import java.util.function.Consumer;
|
|||
|
||||
import org.joml.FrustumIntersection;
|
||||
|
||||
import com.jozufozu.flywheel.api.event.RenderContext;
|
||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||
import com.jozufozu.flywheel.api.instance.TickableInstance;
|
||||
import com.jozufozu.flywheel.api.task.TaskExecutor;
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.backend.instancing.ratelimit.BandedPrimeLimiter;
|
||||
import com.jozufozu.flywheel.backend.instancing.ratelimit.DistanceUpdateLimiter;
|
||||
import com.jozufozu.flywheel.backend.instancing.ratelimit.NonLimiter;
|
||||
import com.jozufozu.flywheel.backend.instancing.storage.Storage;
|
||||
import com.jozufozu.flywheel.config.FlwConfig;
|
||||
import com.jozufozu.flywheel.core.RenderContext;
|
||||
import com.jozufozu.flywheel.light.LightUpdater;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.backend.Engine;
|
||||
import com.jozufozu.flywheel.api.event.BeginFrameEvent;
|
||||
import com.jozufozu.flywheel.api.event.RenderContext;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||
import com.jozufozu.flywheel.api.instance.TickableInstance;
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
|
@ -8,8 +11,7 @@ import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstanceM
|
|||
import com.jozufozu.flywheel.backend.instancing.effect.Effect;
|
||||
import com.jozufozu.flywheel.backend.instancing.effect.EffectInstanceManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.entity.EntityInstanceManager;
|
||||
import com.jozufozu.flywheel.core.RenderContext;
|
||||
import com.jozufozu.flywheel.event.BeginFrameEvent;
|
||||
import com.jozufozu.flywheel.backend.task.ParallelTaskExecutor;
|
||||
import com.jozufozu.flywheel.extension.ClientLevelExtension;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
|
|
@ -2,13 +2,13 @@ package com.jozufozu.flywheel.backend.instancing;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.jozufozu.flywheel.api.event.BeginFrameEvent;
|
||||
import com.jozufozu.flywheel.api.event.ReloadRenderersEvent;
|
||||
import com.jozufozu.flywheel.api.event.RenderStageEvent;
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.backend.instancing.effect.Effect;
|
||||
import com.jozufozu.flywheel.config.FlwCommands;
|
||||
import com.jozufozu.flywheel.config.FlwConfig;
|
||||
import com.jozufozu.flywheel.event.BeginFrameEvent;
|
||||
import com.jozufozu.flywheel.event.ReloadRenderersEvent;
|
||||
import com.jozufozu.flywheel.event.RenderStageEvent;
|
||||
import com.jozufozu.flywheel.util.AnimationTickHolder;
|
||||
import com.jozufozu.flywheel.util.WorldAttached;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
|
||||
import com.jozufozu.flywheel.api.RenderStage;
|
||||
import com.jozufozu.flywheel.api.event.RenderStage;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancedPart;
|
||||
import com.jozufozu.flywheel.api.model.Model;
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.core.model.Model;
|
||||
|
||||
public record InstancerKey<D extends InstancedPart>(StructType<D> type, Model model, RenderStage stage) {
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.backend.instancing.batching;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -7,8 +7,8 @@ import com.jozufozu.flywheel.backend.Backend;
|
|||
import com.jozufozu.flywheel.backend.instancing.AbstractInstance;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstanceManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstancedRenderRegistry;
|
||||
import com.jozufozu.flywheel.backend.instancing.One2OneStorage;
|
||||
import com.jozufozu.flywheel.backend.instancing.Storage;
|
||||
import com.jozufozu.flywheel.backend.instancing.storage.One2OneStorage;
|
||||
import com.jozufozu.flywheel.backend.instancing.storage.Storage;
|
||||
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.backend.instancing.blockentity;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.backend.instancing.compile;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -6,9 +6,9 @@ import com.google.common.collect.HashMultimap;
|
|||
import com.google.common.collect.Multimap;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancerManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.AbstractInstance;
|
||||
import com.jozufozu.flywheel.backend.instancing.AbstractStorage;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstanceManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.Storage;
|
||||
import com.jozufozu.flywheel.backend.instancing.storage.AbstractStorage;
|
||||
import com.jozufozu.flywheel.backend.instancing.storage.Storage;
|
||||
import com.jozufozu.flywheel.light.LightUpdater;
|
||||
|
||||
public class EffectInstanceManager extends InstanceManager<Effect> {
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.backend.instancing.effect;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -7,7 +7,7 @@ import com.jozufozu.flywheel.backend.Backend;
|
|||
import com.jozufozu.flywheel.backend.instancing.AbstractInstance;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstanceManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstancedRenderRegistry;
|
||||
import com.jozufozu.flywheel.backend.instancing.One2OneStorage;
|
||||
import com.jozufozu.flywheel.backend.instancing.storage.One2OneStorage;
|
||||
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.backend.instancing.entity;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.backend.instancing.indirect;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.backend.instancing.instancing;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.backend.instancing;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
package com.jozufozu.flywheel.backend.instancing.storage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||
import com.jozufozu.flywheel.api.instance.TickableInstance;
|
||||
import com.jozufozu.flywheel.api.instancer.InstancerManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.AbstractInstance;
|
||||
import com.jozufozu.flywheel.light.LightUpdater;
|
||||
|
||||
public abstract class AbstractStorage<T> implements Storage<T> {
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
package com.jozufozu.flywheel.backend.instancing.storage;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -6,6 +6,7 @@ import java.util.Map;
|
|||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.jozufozu.flywheel.api.instancer.InstancerManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.AbstractInstance;
|
||||
import com.jozufozu.flywheel.light.LightUpdater;
|
||||
|
||||
public abstract class One2OneStorage<T> extends AbstractStorage<T> {
|
|
@ -1,9 +1,10 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
package com.jozufozu.flywheel.backend.instancing.storage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||
import com.jozufozu.flywheel.api.instance.TickableInstance;
|
||||
import com.jozufozu.flywheel.backend.instancing.AbstractInstance;
|
||||
|
||||
public interface Storage<T> {
|
||||
int getObjectCount();
|
|
@ -1,6 +0,0 @@
|
|||
@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault
|
||||
package com.jozufozu.flywheel.backend;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
package com.jozufozu.flywheel.backend.task;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Deque;
|
||||
|
@ -10,6 +10,7 @@ import org.jetbrains.annotations.Nullable;
|
|||
import org.slf4j.Logger;
|
||||
|
||||
import com.jozufozu.flywheel.Flywheel;
|
||||
import com.jozufozu.flywheel.api.task.TaskExecutor;
|
||||
import com.mojang.logging.LogUtils;
|
||||
|
||||
import net.minecraft.util.Mth;
|
|
@ -1,4 +1,6 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
package com.jozufozu.flywheel.backend.task;
|
||||
|
||||
import com.jozufozu.flywheel.api.task.TaskExecutor;
|
||||
|
||||
public class SerialTaskExecutor implements TaskExecutor {
|
||||
public static final SerialTaskExecutor INSTANCE = new SerialTaskExecutor();
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.backend.instancing;
|
||||
package com.jozufozu.flywheel.backend.task;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.Executor;
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.core.uniform;
|
||||
package com.jozufozu.flywheel.backend.uniform;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
@ -6,11 +6,11 @@ import java.util.List;
|
|||
import org.lwjgl.opengl.GL32;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.jozufozu.flywheel.api.component.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.api.uniform.ShaderUniforms;
|
||||
import com.jozufozu.flywheel.backend.memory.MemoryBlock;
|
||||
import com.jozufozu.flywheel.core.ComponentRegistry;
|
||||
import com.jozufozu.flywheel.gl.buffer.GlBuffer;
|
||||
import com.jozufozu.flywheel.gl.buffer.GlBufferType;
|
||||
import com.jozufozu.flywheel.lib.memory.MemoryBlock;
|
||||
import com.jozufozu.flywheel.util.FlwUtil;
|
||||
import com.jozufozu.flywheel.util.RenderMath;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.core.vertex;
|
||||
package com.jozufozu.flywheel.backend.vertex;
|
||||
|
||||
import com.mojang.blaze3d.vertex.DefaultVertexFormat;
|
||||
import com.mojang.blaze3d.vertex.VertexFormat;
|
|
@ -1,8 +1,9 @@
|
|||
package com.jozufozu.flywheel.core.vertex;
|
||||
package com.jozufozu.flywheel.backend.vertex;
|
||||
|
||||
import org.lwjgl.system.MemoryUtil;
|
||||
|
||||
import com.jozufozu.flywheel.api.vertex.ReusableVertexList;
|
||||
import com.jozufozu.flywheel.lib.format.AbstractVertexList;
|
||||
import com.jozufozu.flywheel.util.RenderMath;
|
||||
import com.mojang.blaze3d.vertex.VertexFormat;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.jozufozu.flywheel.core.vertex;
|
||||
package com.jozufozu.flywheel.backend.vertex;
|
||||
|
||||
import com.jozufozu.flywheel.api.vertex.ReusableVertexList;
|
||||
import com.jozufozu.flywheel.api.vertex.VertexListProvider;
|
|
@ -3,8 +3,8 @@ package com.jozufozu.flywheel.config;
|
|||
import java.util.Collection;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import com.jozufozu.flywheel.backend.BackendType;
|
||||
import com.jozufozu.flywheel.core.BackendTypes;
|
||||
import com.jozufozu.flywheel.api.backend.BackendType;
|
||||
import com.jozufozu.flywheel.lib.backend.BackendTypes;
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.arguments.ArgumentType;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
|
|
|
@ -4,11 +4,11 @@ import java.util.function.BiConsumer;
|
|||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.jozufozu.flywheel.api.backend.BackendType;
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.backend.BackendType;
|
||||
import com.jozufozu.flywheel.backend.SimpleBackendType;
|
||||
import com.jozufozu.flywheel.core.BackendTypes;
|
||||
import com.jozufozu.flywheel.core.uniform.FlwShaderUniforms;
|
||||
import com.jozufozu.flywheel.lib.backend.BackendTypes;
|
||||
import com.jozufozu.flywheel.lib.backend.SimpleBackendType;
|
||||
import com.jozufozu.flywheel.lib.uniform.FlwShaderUniforms;
|
||||
import com.mojang.brigadier.Command;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.jozufozu.flywheel.config;
|
|||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.jozufozu.flywheel.backend.BackendType;
|
||||
import com.jozufozu.flywheel.core.BackendTypes;
|
||||
import com.jozufozu.flywheel.api.backend.BackendType;
|
||||
import com.jozufozu.flywheel.lib.backend.BackendTypes;
|
||||
|
||||
import net.minecraftforge.common.ForgeConfigSpec;
|
||||
import net.minecraftforge.common.ForgeConfigSpec.BooleanValue;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue