The great migration

- Move gl -> backend.gl
- Move glsl -> backend.glsl
- Move lib.layout -> backend.gl.layout
This commit is contained in:
Jozufozu 2024-01-05 18:38:57 -08:00
parent 6047a05ec6
commit dd64ac860c
124 changed files with 284 additions and 322 deletions

View file

@ -3,7 +3,7 @@ package com.jozufozu.flywheel.api.context;
import org.jetbrains.annotations.NotNull;
import com.jozufozu.flywheel.api.registry.Registry;
import com.jozufozu.flywheel.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.impl.RegistryImpl;
import net.minecraft.resources.ResourceLocation;

View file

@ -3,7 +3,6 @@ package com.jozufozu.flywheel.api.instance;
import com.jozufozu.flywheel.api.layout.Layout;
import com.jozufozu.flywheel.api.registry.Registry;
import com.jozufozu.flywheel.impl.RegistryImpl;
import com.jozufozu.flywheel.lib.layout.BufferLayout;
import net.minecraft.resources.ResourceLocation;
@ -21,13 +20,6 @@ public interface InstanceType<I extends Instance> {
*/
I create(InstanceHandle handle);
/**
* @return The layout of I when buffered.
* @deprecated Use {@link #layout()} instead.
*/
@Deprecated
BufferLayout oldLayout();
Layout layout();
InstanceWriter<I> writer();

View file

@ -7,7 +7,7 @@ import com.jozufozu.flywheel.backend.compile.IndirectPrograms;
import com.jozufozu.flywheel.backend.compile.InstancingPrograms;
import com.jozufozu.flywheel.backend.engine.indirect.IndirectEngine;
import com.jozufozu.flywheel.backend.engine.instancing.InstancingEngine;
import com.jozufozu.flywheel.gl.GlCompat;
import com.jozufozu.flywheel.backend.gl.GlCompat;
import com.jozufozu.flywheel.lib.backend.SimpleBackend;
import com.jozufozu.flywheel.lib.util.ShadersModHandler;

View file

@ -2,8 +2,8 @@ package com.jozufozu.flywheel.backend;
import com.jozufozu.flywheel.Flywheel;
import com.jozufozu.flywheel.api.vertex.VertexView;
import com.jozufozu.flywheel.lib.layout.BufferLayout;
import com.jozufozu.flywheel.lib.layout.CommonItems;
import com.jozufozu.flywheel.backend.gl.layout.BufferLayout;
import com.jozufozu.flywheel.backend.gl.layout.CommonItems;
import com.jozufozu.flywheel.lib.vertex.FullVertexView;
import net.minecraft.resources.ResourceLocation;

View file

@ -10,8 +10,8 @@ import com.jozufozu.flywheel.Flywheel;
import com.jozufozu.flywheel.backend.compile.core.CompilerStats;
import com.jozufozu.flywheel.backend.compile.core.ProgramLinker;
import com.jozufozu.flywheel.backend.compile.core.ShaderCompiler;
import com.jozufozu.flywheel.gl.shader.GlProgram;
import com.jozufozu.flywheel.glsl.ShaderSources;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.glsl.ShaderSources;
public class CompilationHarness<K> {
private final KeyCompiler<K> compiler;

View file

@ -16,12 +16,12 @@ import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.backend.compile.core.Compilation;
import com.jozufozu.flywheel.backend.compile.core.ProgramLinker;
import com.jozufozu.flywheel.backend.compile.core.ShaderCompiler;
import com.jozufozu.flywheel.gl.shader.GlProgram;
import com.jozufozu.flywheel.gl.shader.GlShader;
import com.jozufozu.flywheel.gl.shader.ShaderType;
import com.jozufozu.flywheel.glsl.GlslVersion;
import com.jozufozu.flywheel.glsl.ShaderSources;
import com.jozufozu.flywheel.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.gl.shader.GlShader;
import com.jozufozu.flywheel.backend.gl.shader.ShaderType;
import com.jozufozu.flywheel.backend.glsl.GlslVersion;
import com.jozufozu.flywheel.backend.glsl.ShaderSources;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
import net.minecraft.resources.ResourceLocation;

View file

@ -11,10 +11,10 @@ import com.jozufozu.flywheel.backend.ShaderIndices;
import com.jozufozu.flywheel.backend.compile.component.UberShaderComponent;
import com.jozufozu.flywheel.backend.compile.component.UniformComponent;
import com.jozufozu.flywheel.backend.compile.core.CompilerStats;
import com.jozufozu.flywheel.glsl.ShaderSources;
import com.jozufozu.flywheel.glsl.SourceComponent;
import com.jozufozu.flywheel.glsl.generate.FnSignature;
import com.jozufozu.flywheel.glsl.generate.GlslExpr;
import com.jozufozu.flywheel.backend.glsl.ShaderSources;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.glsl.generate.FnSignature;
import com.jozufozu.flywheel.backend.glsl.generate.GlslExpr;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.server.packs.resources.ResourceManagerReloadListener;

View file

@ -11,12 +11,12 @@ import com.jozufozu.flywheel.api.context.Context;
import com.jozufozu.flywheel.api.instance.InstanceType;
import com.jozufozu.flywheel.backend.compile.component.IndirectComponent;
import com.jozufozu.flywheel.backend.compile.component.UniformComponent;
import com.jozufozu.flywheel.gl.GlCompat;
import com.jozufozu.flywheel.gl.shader.GlProgram;
import com.jozufozu.flywheel.gl.shader.ShaderType;
import com.jozufozu.flywheel.glsl.GlslVersion;
import com.jozufozu.flywheel.glsl.ShaderSources;
import com.jozufozu.flywheel.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.gl.GlCompat;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.gl.shader.ShaderType;
import com.jozufozu.flywheel.backend.glsl.GlslVersion;
import com.jozufozu.flywheel.backend.glsl.ShaderSources;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
import com.jozufozu.flywheel.lib.util.Unit;
import net.minecraft.resources.ResourceLocation;

View file

@ -10,9 +10,9 @@ import com.jozufozu.flywheel.Flywheel;
import com.jozufozu.flywheel.api.context.Context;
import com.jozufozu.flywheel.api.instance.InstanceType;
import com.jozufozu.flywheel.backend.compile.component.UniformComponent;
import com.jozufozu.flywheel.gl.shader.GlProgram;
import com.jozufozu.flywheel.glsl.ShaderSources;
import com.jozufozu.flywheel.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.glsl.ShaderSources;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
public class InstancingPrograms {
static InstancingPrograms instance;

View file

@ -3,8 +3,8 @@ package com.jozufozu.flywheel.backend.compile;
import java.util.Objects;
import com.jozufozu.flywheel.api.instance.InstanceType;
import com.jozufozu.flywheel.glsl.GlslVersion;
import com.jozufozu.flywheel.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.glsl.GlslVersion;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
import net.minecraft.resources.ResourceLocation;

View file

@ -5,9 +5,9 @@ import java.util.List;
import com.google.common.collect.ImmutableList;
import com.jozufozu.flywheel.backend.InternalVertex;
import com.jozufozu.flywheel.backend.compile.component.UniformComponent;
import com.jozufozu.flywheel.gl.shader.ShaderType;
import com.jozufozu.flywheel.glsl.ShaderSources;
import com.jozufozu.flywheel.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.gl.shader.ShaderType;
import com.jozufozu.flywheel.backend.glsl.ShaderSources;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
public class PipelineCompiler {
private static final Compile<PipelineProgramKey> PIPELINE = new Compile<>();

View file

@ -3,7 +3,7 @@ package com.jozufozu.flywheel.backend.compile;
import com.jozufozu.flywheel.Flywheel;
import com.jozufozu.flywheel.backend.compile.component.IndirectComponent;
import com.jozufozu.flywheel.backend.compile.component.InstancedArraysComponent;
import com.jozufozu.flywheel.glsl.GlslVersion;
import com.jozufozu.flywheel.backend.glsl.GlslVersion;
public final class Pipelines {
public static final Pipeline INSTANCED_ARRAYS = Pipeline.builder()

View file

@ -3,8 +3,8 @@ package com.jozufozu.flywheel.backend.compile;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.backend.compile.core.CompilerStats;
import com.jozufozu.flywheel.glsl.ShaderSources;
import com.jozufozu.flywheel.glsl.SourceFile;
import com.jozufozu.flywheel.backend.glsl.ShaderSources;
import com.jozufozu.flywheel.backend.glsl.SourceFile;
import net.minecraft.resources.ResourceLocation;

View file

@ -19,12 +19,12 @@ import com.jozufozu.flywheel.api.layout.UnsignedIntegerRepr;
import com.jozufozu.flywheel.api.layout.VectorElementType;
import com.jozufozu.flywheel.backend.compile.LayoutInterpreter;
import com.jozufozu.flywheel.backend.compile.Pipeline;
import com.jozufozu.flywheel.glsl.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.glsl.generate.GlslStruct;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.glsl.generate.FnSignature;
import com.jozufozu.flywheel.backend.glsl.generate.GlslBlock;
import com.jozufozu.flywheel.backend.glsl.generate.GlslBuilder;
import com.jozufozu.flywheel.backend.glsl.generate.GlslExpr;
import com.jozufozu.flywheel.backend.glsl.generate.GlslStruct;
import net.minecraft.resources.ResourceLocation;

View file

@ -7,11 +7,11 @@ import com.jozufozu.flywheel.Flywheel;
import com.jozufozu.flywheel.api.layout.Layout;
import com.jozufozu.flywheel.backend.compile.LayoutInterpreter;
import com.jozufozu.flywheel.backend.compile.Pipeline;
import com.jozufozu.flywheel.glsl.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.backend.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.glsl.generate.FnSignature;
import com.jozufozu.flywheel.backend.glsl.generate.GlslBlock;
import com.jozufozu.flywheel.backend.glsl.generate.GlslBuilder;
import com.jozufozu.flywheel.backend.glsl.generate.GlslExpr;
import net.minecraft.resources.ResourceLocation;

View file

@ -3,7 +3,7 @@ package com.jozufozu.flywheel.backend.compile.component;
import java.util.Collection;
import java.util.Map;
import com.jozufozu.flywheel.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
import net.minecraft.resources.ResourceLocation;

View file

@ -10,13 +10,13 @@ import org.jetbrains.annotations.Nullable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.jozufozu.flywheel.backend.compile.SourceLoader;
import com.jozufozu.flywheel.glsl.SourceComponent;
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.glsl.generate.GlslSwitch;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.glsl.SourceFile;
import com.jozufozu.flywheel.backend.glsl.generate.FnSignature;
import com.jozufozu.flywheel.backend.glsl.generate.GlslBlock;
import com.jozufozu.flywheel.backend.glsl.generate.GlslBuilder;
import com.jozufozu.flywheel.backend.glsl.generate.GlslExpr;
import com.jozufozu.flywheel.backend.glsl.generate.GlslSwitch;
import net.minecraft.resources.ResourceLocation;

View file

@ -6,9 +6,9 @@ import java.util.List;
import com.google.common.collect.ImmutableList;
import com.jozufozu.flywheel.backend.compile.SourceLoader;
import com.jozufozu.flywheel.glsl.SourceComponent;
import com.jozufozu.flywheel.glsl.SourceFile;
import com.jozufozu.flywheel.glsl.generate.GlslBuilder;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.glsl.SourceFile;
import com.jozufozu.flywheel.backend.glsl.generate.GlslBuilder;
import net.minecraft.resources.ResourceLocation;

View file

@ -9,12 +9,12 @@ import org.jetbrains.annotations.NotNull;
import org.lwjgl.opengl.GL20;
import com.jozufozu.flywheel.Flywheel;
import com.jozufozu.flywheel.gl.GlCompat;
import com.jozufozu.flywheel.gl.shader.GlShader;
import com.jozufozu.flywheel.gl.shader.ShaderType;
import com.jozufozu.flywheel.glsl.GlslVersion;
import com.jozufozu.flywheel.glsl.SourceComponent;
import com.jozufozu.flywheel.glsl.SourceFile;
import com.jozufozu.flywheel.backend.gl.GlCompat;
import com.jozufozu.flywheel.backend.gl.shader.GlShader;
import com.jozufozu.flywheel.backend.gl.shader.ShaderType;
import com.jozufozu.flywheel.backend.glsl.GlslVersion;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.glsl.SourceFile;
import com.jozufozu.flywheel.lib.util.StringUtil;
import net.minecraft.client.Minecraft;

View file

@ -9,9 +9,9 @@ import java.util.stream.Collectors;
import org.jetbrains.annotations.NotNull;
import com.jozufozu.flywheel.Flywheel;
import com.jozufozu.flywheel.glsl.LoadError;
import com.jozufozu.flywheel.glsl.LoadResult;
import com.jozufozu.flywheel.glsl.error.ErrorBuilder;
import com.jozufozu.flywheel.backend.glsl.LoadError;
import com.jozufozu.flywheel.backend.glsl.LoadResult;
import com.jozufozu.flywheel.backend.glsl.error.ErrorBuilder;
import com.jozufozu.flywheel.lib.util.StringUtil;
public class CompilerStats {

View file

@ -11,12 +11,12 @@ import java.util.stream.Stream;
import org.jetbrains.annotations.NotNull;
import com.jozufozu.flywheel.Flywheel;
import com.jozufozu.flywheel.glsl.SourceFile;
import com.jozufozu.flywheel.glsl.SourceLines;
import com.jozufozu.flywheel.glsl.error.ConsoleColors;
import com.jozufozu.flywheel.glsl.error.ErrorBuilder;
import com.jozufozu.flywheel.glsl.error.ErrorLevel;
import com.jozufozu.flywheel.glsl.span.Span;
import com.jozufozu.flywheel.backend.glsl.SourceFile;
import com.jozufozu.flywheel.backend.glsl.SourceLines;
import com.jozufozu.flywheel.backend.glsl.error.ConsoleColors;
import com.jozufozu.flywheel.backend.glsl.error.ErrorBuilder;
import com.jozufozu.flywheel.backend.glsl.error.ErrorLevel;
import com.jozufozu.flywheel.backend.glsl.span.Span;
import com.jozufozu.flywheel.lib.util.StringUtil;
import net.minecraft.resources.ResourceLocation;

View file

@ -3,7 +3,7 @@ package com.jozufozu.flywheel.backend.compile.core;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
public sealed interface LinkResult {
@Nullable

View file

@ -12,8 +12,8 @@ import java.util.List;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.gl.shader.GlProgram;
import com.jozufozu.flywheel.gl.shader.GlShader;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.gl.shader.GlShader;
public class ProgramLinker {
private final CompilerStats stats;

View file

@ -10,10 +10,10 @@ import java.util.function.Consumer;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.gl.shader.GlShader;
import com.jozufozu.flywheel.gl.shader.ShaderType;
import com.jozufozu.flywheel.glsl.GlslVersion;
import com.jozufozu.flywheel.glsl.SourceComponent;
import com.jozufozu.flywheel.backend.gl.shader.GlShader;
import com.jozufozu.flywheel.backend.gl.shader.ShaderType;
import com.jozufozu.flywheel.backend.glsl.GlslVersion;
import com.jozufozu.flywheel.backend.glsl.SourceComponent;
public class ShaderCompiler {
private final Map<ShaderKey, ShaderResult> shaderCache = new HashMap<>();

View file

@ -3,7 +3,7 @@ package com.jozufozu.flywheel.backend.compile.core;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.gl.shader.GlShader;
import com.jozufozu.flywheel.backend.gl.shader.GlShader;
public sealed interface ShaderResult {
@Nullable

View file

@ -3,7 +3,7 @@ package com.jozufozu.flywheel.backend.engine;
import com.jozufozu.flywheel.api.material.Material;
import com.jozufozu.flywheel.api.material.Transparency;
import com.jozufozu.flywheel.api.material.WriteMask;
import com.jozufozu.flywheel.gl.GlTextureUnit;
import com.jozufozu.flywheel.backend.gl.GlTextureUnit;
import com.jozufozu.flywheel.lib.material.CutoutShaders;
import com.jozufozu.flywheel.lib.material.FogShaders;
import com.jozufozu.flywheel.lib.material.SimpleMaterial;

View file

@ -11,8 +11,8 @@ import com.jozufozu.flywheel.api.layout.ScalarElementType;
import com.jozufozu.flywheel.api.layout.UnsignedIntegerRepr;
import com.jozufozu.flywheel.api.layout.ValueRepr;
import com.jozufozu.flywheel.api.layout.VectorElementType;
import com.jozufozu.flywheel.gl.GlNumericType;
import com.jozufozu.flywheel.gl.array.VertexAttribute;
import com.jozufozu.flywheel.backend.gl.GlNumericType;
import com.jozufozu.flywheel.backend.gl.array.VertexAttribute;
public class LayoutAttributes {
/**

View file

@ -8,7 +8,7 @@ import com.jozufozu.flywheel.api.material.DepthTest;
import com.jozufozu.flywheel.api.material.Material;
import com.jozufozu.flywheel.api.material.Transparency;
import com.jozufozu.flywheel.api.material.WriteMask;
import com.jozufozu.flywheel.gl.GlTextureUnit;
import com.jozufozu.flywheel.backend.gl.GlTextureUnit;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;

View file

@ -8,7 +8,7 @@ import org.lwjgl.opengl.GL32;
import com.google.common.collect.ImmutableList;
import com.jozufozu.flywheel.api.event.ReloadLevelRendererEvent;
import com.jozufozu.flywheel.api.uniform.ShaderUniforms;
import com.jozufozu.flywheel.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.lib.math.MoreMath;
import com.jozufozu.flywheel.lib.memory.MemoryBlock;

View file

@ -6,7 +6,7 @@ import static org.lwjgl.opengl.GL44.nglBindBuffersRange;
import org.lwjgl.system.MemoryUtil;
import org.lwjgl.system.Pointer;
import com.jozufozu.flywheel.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.lib.memory.MemoryBlock;
public class IndirectBuffers {

View file

@ -25,9 +25,9 @@ import com.jozufozu.flywheel.api.model.Model;
import com.jozufozu.flywheel.backend.compile.IndirectPrograms;
import com.jozufozu.flywheel.backend.engine.MaterialRenderState;
import com.jozufozu.flywheel.backend.engine.UniformBuffer;
import com.jozufozu.flywheel.gl.Driver;
import com.jozufozu.flywheel.gl.GlCompat;
import com.jozufozu.flywheel.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.gl.Driver;
import com.jozufozu.flywheel.backend.gl.GlCompat;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.lib.context.Contexts;
public class IndirectCullingGroup<I extends Instance> {

View file

@ -23,8 +23,8 @@ import com.jozufozu.flywheel.backend.engine.InstanceHandleImpl;
import com.jozufozu.flywheel.backend.engine.InstancerKey;
import com.jozufozu.flywheel.backend.engine.InstancerStorage;
import com.jozufozu.flywheel.backend.engine.MaterialRenderState;
import com.jozufozu.flywheel.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.lib.material.SimpleMaterial;
import com.jozufozu.flywheel.lib.memory.MemoryBlock;
import com.jozufozu.flywheel.lib.util.Pair;

View file

@ -10,8 +10,8 @@ import com.jozufozu.flywheel.backend.engine.AbstractEngine;
import com.jozufozu.flywheel.backend.engine.AbstractInstancer;
import com.jozufozu.flywheel.backend.engine.InstancerStorage;
import com.jozufozu.flywheel.backend.engine.MaterialRenderState;
import com.jozufozu.flywheel.gl.GlStateTracker;
import com.jozufozu.flywheel.gl.GlTextureUnit;
import com.jozufozu.flywheel.backend.gl.GlStateTracker;
import com.jozufozu.flywheel.backend.gl.GlTextureUnit;
import com.jozufozu.flywheel.lib.task.Flag;
import com.jozufozu.flywheel.lib.task.NamedFlag;
import com.jozufozu.flywheel.lib.task.SyncedPlan;

View file

@ -10,9 +10,9 @@ import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.api.model.Mesh;
import com.jozufozu.flywheel.api.vertex.VertexView;
import com.jozufozu.flywheel.backend.InternalVertex;
import com.jozufozu.flywheel.gl.GlNumericType;
import com.jozufozu.flywheel.gl.array.GlVertexArray;
import com.jozufozu.flywheel.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.backend.gl.GlNumericType;
import com.jozufozu.flywheel.backend.gl.array.GlVertexArray;
import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.lib.memory.MemoryBlock;
import com.jozufozu.flywheel.lib.model.QuadIndexSequence;

View file

@ -5,7 +5,7 @@ import static org.lwjgl.opengl.GL45.glCopyNamedBufferSubData;
import static org.lwjgl.opengl.GL45.glCreateBuffers;
import static org.lwjgl.opengl.GL45.glNamedBufferStorage;
import com.jozufozu.flywheel.gl.GlObject;
import com.jozufozu.flywheel.backend.gl.GlObject;
import com.jozufozu.flywheel.lib.memory.FlwMemoryTracker;
/**

View file

@ -9,9 +9,9 @@ import org.lwjgl.opengl.GL45C;
import org.lwjgl.system.MemoryUtil;
import com.jozufozu.flywheel.backend.compile.IndirectPrograms;
import com.jozufozu.flywheel.gl.GlCompat;
import com.jozufozu.flywheel.gl.GlFence;
import com.jozufozu.flywheel.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.backend.gl.GlCompat;
import com.jozufozu.flywheel.backend.gl.GlFence;
import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.lib.memory.FlwMemoryTracker;
import com.jozufozu.flywheel.lib.memory.MemoryBlock;

View file

@ -2,7 +2,7 @@ package com.jozufozu.flywheel.backend.engine.instancing;
import com.jozufozu.flywheel.backend.InternalVertex;
import com.jozufozu.flywheel.backend.engine.InstanceHandleImpl;
import com.jozufozu.flywheel.gl.array.GlVertexArray;
import com.jozufozu.flywheel.backend.gl.array.GlVertexArray;
public class DrawCall {
public final ShaderState shaderState;

View file

@ -7,9 +7,9 @@ import org.jetbrains.annotations.NotNull;
import org.lwjgl.system.MemoryUtil;
import com.jozufozu.flywheel.api.model.IndexSequence;
import com.jozufozu.flywheel.gl.GlNumericType;
import com.jozufozu.flywheel.gl.buffer.Buffer;
import com.jozufozu.flywheel.gl.buffer.GlBufferUsage;
import com.jozufozu.flywheel.backend.gl.GlNumericType;
import com.jozufozu.flywheel.backend.gl.buffer.Buffer;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferUsage;
import com.jozufozu.flywheel.lib.memory.FlwMemoryTracker;
import com.jozufozu.flywheel.lib.model.QuadIndexSequence;
import com.mojang.blaze3d.platform.GlStateManager;

View file

@ -14,7 +14,7 @@ import com.jozufozu.flywheel.backend.engine.CommonCrumbling;
import com.jozufozu.flywheel.backend.engine.InstanceHandleImpl;
import com.jozufozu.flywheel.backend.engine.MaterialRenderState;
import com.jozufozu.flywheel.backend.engine.UniformBuffer;
import com.jozufozu.flywheel.gl.GlStateTracker;
import com.jozufozu.flywheel.backend.gl.GlStateTracker;
import com.jozufozu.flywheel.lib.context.Contexts;
import com.jozufozu.flywheel.lib.material.SimpleMaterial;

View file

@ -11,11 +11,11 @@ import com.jozufozu.flywheel.api.instance.InstanceType;
import com.jozufozu.flywheel.api.instance.InstanceWriter;
import com.jozufozu.flywheel.backend.engine.AbstractInstancer;
import com.jozufozu.flywheel.backend.engine.LayoutAttributes;
import com.jozufozu.flywheel.gl.array.GlVertexArray;
import com.jozufozu.flywheel.gl.array.VertexAttribute;
import com.jozufozu.flywheel.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.gl.buffer.GlBufferUsage;
import com.jozufozu.flywheel.gl.buffer.MappedBuffer;
import com.jozufozu.flywheel.backend.gl.array.GlVertexArray;
import com.jozufozu.flywheel.backend.gl.array.VertexAttribute;
import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferUsage;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
public class InstancedInstancer<I extends Instance> extends AbstractInstancer<I> {
private final List<VertexAttribute> instanceAttributes;

View file

@ -14,10 +14,10 @@ import com.jozufozu.flywheel.Flywheel;
import com.jozufozu.flywheel.api.model.Mesh;
import com.jozufozu.flywheel.api.vertex.VertexView;
import com.jozufozu.flywheel.backend.InternalVertex;
import com.jozufozu.flywheel.gl.GlPrimitive;
import com.jozufozu.flywheel.gl.array.GlVertexArray;
import com.jozufozu.flywheel.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.gl.buffer.MappedBuffer;
import com.jozufozu.flywheel.backend.gl.GlPrimitive;
import com.jozufozu.flywheel.backend.gl.array.GlVertexArray;
import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
public class InstancedMeshPool {
private final VertexView vertexView;

View file

@ -17,9 +17,9 @@ import com.jozufozu.flywheel.backend.engine.InstancerStorage;
import com.jozufozu.flywheel.backend.engine.MaterialEncoder;
import com.jozufozu.flywheel.backend.engine.MaterialRenderState;
import com.jozufozu.flywheel.backend.engine.UniformBuffer;
import com.jozufozu.flywheel.gl.GlStateTracker;
import com.jozufozu.flywheel.gl.GlTextureUnit;
import com.jozufozu.flywheel.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.gl.GlStateTracker;
import com.jozufozu.flywheel.backend.gl.GlTextureUnit;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.lib.context.Contexts;
import com.jozufozu.flywheel.lib.task.Flag;
import com.jozufozu.flywheel.lib.task.NamedFlag;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl;
package com.jozufozu.flywheel.backend.gl;
public enum Driver {
NVIDIA,

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl;
package com.jozufozu.flywheel.backend.gl;
import java.nio.ByteBuffer;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl;
package com.jozufozu.flywheel.backend.gl;
import static org.lwjgl.opengl.GL32.GL_SIGNALED;
import static org.lwjgl.opengl.GL32.GL_SYNC_GPU_COMMANDS_COMPLETE;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl;
package com.jozufozu.flywheel.backend.gl;
import org.lwjgl.opengl.GL11;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl;
package com.jozufozu.flywheel.backend.gl;
// Utility class for safely dealing with gl object handles.
public abstract class GlObject {

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl;
package com.jozufozu.flywheel.backend.gl;
import org.lwjgl.opengl.GL11;

View file

@ -1,6 +1,6 @@
package com.jozufozu.flywheel.gl;
package com.jozufozu.flywheel.backend.gl;
import com.jozufozu.flywheel.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
import com.mojang.blaze3d.platform.GlStateManager;
/**

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl;
package com.jozufozu.flywheel.backend.gl;
import org.lwjgl.opengl.GL20;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl;
package com.jozufozu.flywheel.backend.gl;
import static org.lwjgl.opengl.GL13.GL_TEXTURE0;

View file

@ -1,11 +1,11 @@
package com.jozufozu.flywheel.gl.array;
package com.jozufozu.flywheel.backend.gl.array;
import java.util.List;
import org.lwjgl.opengl.GL32;
import com.jozufozu.flywheel.gl.GlObject;
import com.jozufozu.flywheel.gl.GlStateTracker;
import com.jozufozu.flywheel.backend.gl.GlObject;
import com.jozufozu.flywheel.backend.gl.GlStateTracker;
import com.mojang.blaze3d.platform.GlStateManager;
public abstract class GlVertexArray extends GlObject {

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.array;
package com.jozufozu.flywheel.backend.gl.array;
import java.util.BitSet;
import java.util.List;
@ -6,7 +6,7 @@ import java.util.List;
import org.lwjgl.opengl.GL45C;
import org.lwjgl.system.Checks;
import com.jozufozu.flywheel.gl.GlCompat;
import com.jozufozu.flywheel.backend.gl.GlCompat;
import com.jozufozu.flywheel.lib.util.FlwUtil;
public class GlVertexArrayDSA extends GlVertexArray {

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.array;
package com.jozufozu.flywheel.backend.gl.array;
import java.util.BitSet;
import java.util.List;
@ -10,8 +10,8 @@ import org.lwjgl.opengl.GL32;
import org.lwjgl.opengl.GL33C;
import org.lwjgl.system.Checks;
import com.jozufozu.flywheel.gl.GlCompat;
import com.jozufozu.flywheel.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.backend.gl.GlCompat;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.lib.util.FlwUtil;
public abstract class GlVertexArrayGL3 extends GlVertexArray {

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.array;
package com.jozufozu.flywheel.backend.gl.array;
import java.util.BitSet;
import java.util.List;
@ -6,9 +6,9 @@ import java.util.List;
import org.lwjgl.opengl.GL43C;
import org.lwjgl.system.Checks;
import com.jozufozu.flywheel.gl.GlCompat;
import com.jozufozu.flywheel.gl.GlStateTracker;
import com.jozufozu.flywheel.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.backend.gl.GlCompat;
import com.jozufozu.flywheel.backend.gl.GlStateTracker;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.lib.util.FlwUtil;
public class GlVertexArraySeparateAttributes extends GlVertexArray {

View file

@ -1,6 +1,6 @@
package com.jozufozu.flywheel.gl.array;
package com.jozufozu.flywheel.backend.gl.array;
import com.jozufozu.flywheel.gl.GlNumericType;
import com.jozufozu.flywheel.backend.gl.GlNumericType;
public sealed interface VertexAttribute {
int byteWidth();

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.buffer;
package com.jozufozu.flywheel.backend.gl.buffer;
import org.lwjgl.opengl.GL15;
import org.lwjgl.opengl.GL30;
@ -6,7 +6,7 @@ import org.lwjgl.opengl.GL31;
import org.lwjgl.opengl.GL45C;
import org.lwjgl.system.Checks;
import com.jozufozu.flywheel.gl.GlCompat;
import com.jozufozu.flywheel.backend.gl.GlCompat;
public interface Buffer {
Buffer IMPL = new DSA().fallback();

View file

@ -1,8 +1,8 @@
package com.jozufozu.flywheel.gl.buffer;
package com.jozufozu.flywheel.backend.gl.buffer;
import org.lwjgl.system.MemoryUtil;
import com.jozufozu.flywheel.gl.GlObject;
import com.jozufozu.flywheel.backend.gl.GlObject;
import com.jozufozu.flywheel.lib.memory.FlwMemoryTracker;
import com.jozufozu.flywheel.lib.memory.MemoryBlock;
import com.mojang.blaze3d.platform.GlStateManager;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.buffer;
package com.jozufozu.flywheel.backend.gl.buffer;
import org.lwjgl.opengl.GL15C;
import org.lwjgl.opengl.GL21;
@ -8,7 +8,7 @@ import org.lwjgl.opengl.GL40;
import org.lwjgl.opengl.GL42;
import org.lwjgl.opengl.GL43;
import com.jozufozu.flywheel.gl.GlStateTracker;
import com.jozufozu.flywheel.backend.gl.GlStateTracker;
public enum GlBufferType {
ARRAY_BUFFER(GL15C.GL_ARRAY_BUFFER, GL15C.GL_ARRAY_BUFFER_BINDING),

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.buffer;
package com.jozufozu.flywheel.backend.gl.buffer;
import org.lwjgl.opengl.GL15;

View file

@ -1,12 +1,12 @@
package com.jozufozu.flywheel.gl.buffer;
package com.jozufozu.flywheel.backend.gl.buffer;
import static org.lwjgl.opengl.GL30.GL_MAP_WRITE_BIT;
import static org.lwjgl.system.MemoryUtil.NULL;
import org.lwjgl.system.MemoryUtil;
import com.jozufozu.flywheel.gl.error.GlError;
import com.jozufozu.flywheel.gl.error.GlException;
import com.jozufozu.flywheel.backend.gl.error.GlError;
import com.jozufozu.flywheel.backend.gl.error.GlException;
public class MappedBuffer implements AutoCloseable {
private final int glBuffer;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.buffer;
package com.jozufozu.flywheel.backend.gl.buffer;
import org.lwjgl.opengl.GL15C;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.error;
package com.jozufozu.flywheel.backend.gl.error;
import java.util.function.Supplier;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.error;
package com.jozufozu.flywheel.backend.gl.error;
public class GlException extends RuntimeException {

View file

@ -1,9 +1,9 @@
package com.jozufozu.flywheel.lib.layout;
package com.jozufozu.flywheel.backend.gl.layout;
import java.util.List;
import com.google.common.collect.ImmutableList;
import com.jozufozu.flywheel.gl.array.VertexAttribute;
import com.jozufozu.flywheel.backend.gl.array.VertexAttribute;
/**
* Classic Vertex Format with a clever name.

View file

@ -1,9 +1,9 @@
package com.jozufozu.flywheel.lib.layout;
package com.jozufozu.flywheel.backend.gl.layout;
import com.jozufozu.flywheel.gl.GlNumericType;
import com.jozufozu.flywheel.gl.array.VertexAttribute;
import com.jozufozu.flywheel.glsl.generate.FnSignature;
import com.jozufozu.flywheel.glsl.generate.GlslExpr;
import com.jozufozu.flywheel.backend.gl.GlNumericType;
import com.jozufozu.flywheel.backend.gl.array.VertexAttribute;
import com.jozufozu.flywheel.backend.glsl.generate.FnSignature;
import com.jozufozu.flywheel.backend.glsl.generate.GlslExpr;
public final class CommonItems {
private static final String VEC2_TYPE = "vec2";

View file

@ -1,10 +1,10 @@
package com.jozufozu.flywheel.lib.layout;
package com.jozufozu.flywheel.backend.gl.layout;
import java.util.function.Consumer;
import com.jozufozu.flywheel.gl.array.VertexAttribute;
import com.jozufozu.flywheel.glsl.generate.GlslBuilder;
import com.jozufozu.flywheel.glsl.generate.GlslExpr;
import com.jozufozu.flywheel.backend.gl.array.VertexAttribute;
import com.jozufozu.flywheel.backend.glsl.generate.GlslBuilder;
import com.jozufozu.flywheel.backend.glsl.generate.GlslExpr;
public interface InputType {

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.lib.layout;
package com.jozufozu.flywheel.backend.gl.layout;
public record LayoutItem(InputType type, String name) {

View file

@ -1,14 +1,14 @@
package com.jozufozu.flywheel.lib.layout;
package com.jozufozu.flywheel.backend.gl.layout;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import com.jozufozu.flywheel.gl.GlNumericType;
import com.jozufozu.flywheel.gl.array.VertexAttribute;
import com.jozufozu.flywheel.glsl.generate.FnSignature;
import com.jozufozu.flywheel.glsl.generate.GlslBuilder;
import com.jozufozu.flywheel.glsl.generate.GlslExpr;
import com.jozufozu.flywheel.backend.gl.GlNumericType;
import com.jozufozu.flywheel.backend.gl.array.VertexAttribute;
import com.jozufozu.flywheel.backend.glsl.generate.FnSignature;
import com.jozufozu.flywheel.backend.glsl.generate.GlslBuilder;
import com.jozufozu.flywheel.backend.glsl.generate.GlslExpr;
public record MatInput(int rows, int cols, String typeName, String packedTypeName,
String unpackingFunction) implements InputType {

View file

@ -1,11 +1,11 @@
package com.jozufozu.flywheel.lib.layout;
package com.jozufozu.flywheel.backend.gl.layout;
import java.util.function.Consumer;
import java.util.function.Function;
import com.jozufozu.flywheel.gl.array.VertexAttribute;
import com.jozufozu.flywheel.glsl.generate.GlslBuilder;
import com.jozufozu.flywheel.glsl.generate.GlslExpr;
import com.jozufozu.flywheel.backend.gl.array.VertexAttribute;
import com.jozufozu.flywheel.backend.glsl.generate.GlslBuilder;
import com.jozufozu.flywheel.backend.glsl.generate.GlslExpr;
public class VecInput implements InputType {
private final VertexAttribute attribute;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.shader;
package com.jozufozu.flywheel.backend.gl.shader;
import static org.lwjgl.opengl.GL20.glDeleteProgram;
import static org.lwjgl.opengl.GL20.glGetUniformLocation;
@ -9,7 +9,7 @@ import static org.lwjgl.opengl.GL31.glUniformBlockBinding;
import org.slf4j.Logger;
import com.jozufozu.flywheel.gl.GlObject;
import com.jozufozu.flywheel.backend.gl.GlObject;
import com.mojang.blaze3d.shaders.ProgramManager;
import com.mojang.logging.LogUtils;

View file

@ -1,8 +1,8 @@
package com.jozufozu.flywheel.gl.shader;
package com.jozufozu.flywheel.backend.gl.shader;
import org.lwjgl.opengl.GL20;
import com.jozufozu.flywheel.gl.GlObject;
import com.jozufozu.flywheel.backend.gl.GlObject;
public class GlShader extends GlObject {

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.gl.shader;
package com.jozufozu.flywheel.backend.gl.shader;
import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GL43;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl;
package com.jozufozu.flywheel.backend.glsl;
public enum GlslVersion {
V110(110),

View file

@ -1,12 +1,12 @@
package com.jozufozu.flywheel.glsl;
package com.jozufozu.flywheel.backend.glsl;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
import java.util.stream.Collectors;
import com.jozufozu.flywheel.glsl.error.ErrorBuilder;
import com.jozufozu.flywheel.glsl.span.Span;
import com.jozufozu.flywheel.backend.glsl.error.ErrorBuilder;
import com.jozufozu.flywheel.backend.glsl.span.Span;
import com.jozufozu.flywheel.lib.util.Pair;
import net.minecraft.ResourceLocationException;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl;
package com.jozufozu.flywheel.backend.glsl;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl;
package com.jozufozu.flywheel.backend.glsl;
import java.io.IOException;
import java.io.InputStream;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl;
package com.jozufozu.flywheel.backend.glsl;
import java.util.Collection;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl;
package com.jozufozu.flywheel.backend.glsl;
import java.util.ArrayList;
import java.util.Collection;
@ -12,12 +12,12 @@ import org.jetbrains.annotations.Nullable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.jozufozu.flywheel.glsl.parse.Import;
import com.jozufozu.flywheel.glsl.parse.ShaderField;
import com.jozufozu.flywheel.glsl.parse.ShaderFunction;
import com.jozufozu.flywheel.glsl.parse.ShaderStruct;
import com.jozufozu.flywheel.glsl.span.Span;
import com.jozufozu.flywheel.glsl.span.StringSpan;
import com.jozufozu.flywheel.backend.glsl.parse.Import;
import com.jozufozu.flywheel.backend.glsl.parse.ShaderField;
import com.jozufozu.flywheel.backend.glsl.parse.ShaderFunction;
import com.jozufozu.flywheel.backend.glsl.parse.ShaderStruct;
import com.jozufozu.flywheel.backend.glsl.span.Span;
import com.jozufozu.flywheel.backend.glsl.span.StringSpan;
import com.jozufozu.flywheel.lib.util.Pair;
import com.jozufozu.flywheel.lib.util.ResourceUtil;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl;
package com.jozufozu.flywheel.backend.glsl;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -6,7 +6,7 @@ import java.util.regex.Pattern;
import org.jetbrains.annotations.NotNull;
import com.google.common.collect.ImmutableList;
import com.jozufozu.flywheel.glsl.span.CharPos;
import com.jozufozu.flywheel.backend.glsl.span.CharPos;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntList;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.error;
package com.jozufozu.flywheel.backend.glsl.error;
// https://stackoverflow.com/a/45444716
public final class ConsoleColors {

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.error;
package com.jozufozu.flywheel.backend.glsl.error;
import java.util.ArrayList;
import java.util.List;
@ -9,16 +9,16 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.VisibleForTesting;
import com.jozufozu.flywheel.glsl.SourceFile;
import com.jozufozu.flywheel.glsl.SourceLines;
import com.jozufozu.flywheel.glsl.error.lines.ErrorLine;
import com.jozufozu.flywheel.glsl.error.lines.FileLine;
import com.jozufozu.flywheel.glsl.error.lines.HeaderLine;
import com.jozufozu.flywheel.glsl.error.lines.NestedLine;
import com.jozufozu.flywheel.glsl.error.lines.SourceLine;
import com.jozufozu.flywheel.glsl.error.lines.SpanHighlightLine;
import com.jozufozu.flywheel.glsl.error.lines.TextLine;
import com.jozufozu.flywheel.glsl.span.Span;
import com.jozufozu.flywheel.backend.glsl.SourceFile;
import com.jozufozu.flywheel.backend.glsl.SourceLines;
import com.jozufozu.flywheel.backend.glsl.error.lines.ErrorLine;
import com.jozufozu.flywheel.backend.glsl.error.lines.FileLine;
import com.jozufozu.flywheel.backend.glsl.error.lines.HeaderLine;
import com.jozufozu.flywheel.backend.glsl.error.lines.NestedLine;
import com.jozufozu.flywheel.backend.glsl.error.lines.SourceLine;
import com.jozufozu.flywheel.backend.glsl.error.lines.SpanHighlightLine;
import com.jozufozu.flywheel.backend.glsl.error.lines.TextLine;
import com.jozufozu.flywheel.backend.glsl.span.Span;
import com.jozufozu.flywheel.lib.util.StringUtil;
import net.minecraft.resources.ResourceLocation;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.error;
package com.jozufozu.flywheel.backend.glsl.error;
public enum ErrorLevel {
WARN(ConsoleColors.YELLOW, "warn"),

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.error.lines;
package com.jozufozu.flywheel.backend.glsl.error.lines;
public enum Divider {
BAR(" | "),

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.error.lines;
package com.jozufozu.flywheel.backend.glsl.error.lines;
public interface ErrorLine {
@ -6,8 +6,8 @@ public interface ErrorLine {
return left().length();
}
default Divider divider() {
return Divider.BAR;
default com.jozufozu.flywheel.glsl.error.lines.Divider divider() {
return com.jozufozu.flywheel.glsl.error.lines.Divider.BAR;
}
default String build() {

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.error.lines;
package com.jozufozu.flywheel.backend.glsl.error.lines;
public record FileLine(String fileName) implements ErrorLine {
@ -8,8 +8,8 @@ public record FileLine(String fileName) implements ErrorLine {
}
@Override
public Divider divider() {
return Divider.ARROW;
public com.jozufozu.flywheel.glsl.error.lines.Divider divider() {
return com.jozufozu.flywheel.glsl.error.lines.Divider.ARROW;
}
@Override

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.error.lines;
package com.jozufozu.flywheel.backend.glsl.error.lines;
public record HeaderLine(String level, CharSequence message) implements ErrorLine {

View file

@ -0,0 +1,13 @@
package com.jozufozu.flywheel.backend.glsl.error.lines;
public record NestedLine(String right) implements ErrorLine {
@Override
public String right() {
return right;
}
@Override
public com.jozufozu.flywheel.glsl.error.lines.Divider divider() {
return com.jozufozu.flywheel.glsl.error.lines.Divider.EQUALS;
}
}

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.error.lines;
package com.jozufozu.flywheel.backend.glsl.error.lines;
public record SourceLine(String number, String line) implements ErrorLine {

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.error.lines;
package com.jozufozu.flywheel.backend.glsl.error.lines;
public class SpanHighlightLine implements ErrorLine {
private final String line;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.error.lines;
package com.jozufozu.flywheel.backend.glsl.error.lines;
public record TextLine(String msg) implements ErrorLine {

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.generate;
package com.jozufozu.flywheel.backend.glsl.generate;
public enum BinOp {
BITWISE_AND("&"),

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.generate;
package com.jozufozu.flywheel.backend.glsl.generate;
import java.util.Collection;
import java.util.stream.Collectors;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.generate;
package com.jozufozu.flywheel.backend.glsl.generate;
import java.util.ArrayList;
import java.util.List;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.generate;
package com.jozufozu.flywheel.backend.glsl.generate;
import java.util.ArrayList;
import java.util.List;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.generate;
package com.jozufozu.flywheel.backend.glsl.generate;
import java.util.Collection;
import java.util.List;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.generate;
package com.jozufozu.flywheel.backend.glsl.generate;
import java.util.function.Consumer;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.generate;
package com.jozufozu.flywheel.backend.glsl.generate;
public interface GlslStmt {
GlslStmt BREAK = () -> "break;";

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.generate;
package com.jozufozu.flywheel.backend.glsl.generate;
import java.util.ArrayList;
import java.util.List;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.glsl.generate;
package com.jozufozu.flywheel.backend.glsl.generate;
import java.util.ArrayList;
import java.util.List;

Some files were not shown because too many files have changed in this diff Show more