From dd64ac860cbf160ad982d392b4288eba59e58961 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Fri, 5 Jan 2024 18:38:57 -0800 Subject: [PATCH] The great migration - Move gl -> backend.gl - Move glsl -> backend.glsl - Move lib.layout -> backend.gl.layout --- .../flywheel/api/context/Context.java | 2 +- .../flywheel/api/instance/InstanceType.java | 8 ------- .../jozufozu/flywheel/backend/Backends.java | 2 +- .../flywheel/backend/InternalVertex.java | 4 ++-- .../backend/compile/CompilationHarness.java | 4 ++-- .../flywheel/backend/compile/Compile.java | 12 +++++----- .../flywheel/backend/compile/FlwPrograms.java | 8 +++---- .../backend/compile/IndirectPrograms.java | 12 +++++----- .../backend/compile/InstancingPrograms.java | 6 ++--- .../flywheel/backend/compile/Pipeline.java | 4 ++-- .../backend/compile/PipelineCompiler.java | 6 ++--- .../flywheel/backend/compile/Pipelines.java | 2 +- .../backend/compile/SourceLoader.java | 4 ++-- .../compile/component/IndirectComponent.java | 12 +++++----- .../component/InstancedArraysComponent.java | 10 ++++----- .../StringSubstitutionSourceComponent.java | 2 +- .../component/UberShaderComponent.java | 14 ++++++------ .../compile/component/UniformComponent.java | 6 ++--- .../backend/compile/core/Compilation.java | 12 +++++----- .../backend/compile/core/CompilerStats.java | 6 ++--- .../compile/core/FailedCompilation.java | 12 +++++----- .../backend/compile/core/LinkResult.java | 2 +- .../backend/compile/core/ProgramLinker.java | 4 ++-- .../backend/compile/core/ShaderCompiler.java | 8 +++---- .../backend/compile/core/ShaderResult.java | 2 +- .../backend/engine/CommonCrumbling.java | 2 +- .../backend/engine/LayoutAttributes.java | 4 ++-- .../backend/engine/MaterialRenderState.java | 2 +- .../backend/engine/UniformBuffer.java | 2 +- .../engine/indirect/IndirectBuffers.java | 2 +- .../engine/indirect/IndirectCullingGroup.java | 6 ++--- .../engine/indirect/IndirectDrawManager.java | 4 ++-- .../engine/indirect/IndirectEngine.java | 4 ++-- .../engine/indirect/IndirectMeshPool.java | 6 ++--- .../indirect/ResizableStorageBuffer.java | 2 +- .../engine/indirect/StagingBuffer.java | 6 ++--- .../backend/engine/instancing/DrawCall.java | 2 +- .../backend/engine/instancing/EboCache.java | 6 ++--- .../engine/instancing/InstancedCrumbling.java | 2 +- .../engine/instancing/InstancedInstancer.java | 10 ++++----- .../engine/instancing/InstancedMeshPool.java | 8 +++---- .../engine/instancing/InstancingEngine.java | 6 ++--- .../flywheel/{ => backend}/gl/Driver.java | 2 +- .../flywheel/{ => backend}/gl/GlCompat.java | 2 +- .../flywheel/{ => backend}/gl/GlFence.java | 2 +- .../{ => backend}/gl/GlNumericType.java | 2 +- .../flywheel/{ => backend}/gl/GlObject.java | 2 +- .../{ => backend}/gl/GlPrimitive.java | 2 +- .../{ => backend}/gl/GlStateTracker.java | 4 ++-- .../flywheel/{ => backend}/gl/GlTexture.java | 2 +- .../{ => backend}/gl/GlTextureUnit.java | 2 +- .../{ => backend}/gl/array/GlVertexArray.java | 6 ++--- .../gl/array/GlVertexArrayDSA.java | 4 ++-- .../gl/array/GlVertexArrayGL3.java | 6 ++--- .../GlVertexArraySeparateAttributes.java | 8 +++---- .../gl/array/VertexAttribute.java | 4 ++-- .../{ => backend}/gl/buffer/Buffer.java | 4 ++-- .../{ => backend}/gl/buffer/GlBuffer.java | 4 ++-- .../{ => backend}/gl/buffer/GlBufferType.java | 4 ++-- .../gl/buffer/GlBufferUsage.java | 2 +- .../{ => backend}/gl/buffer/MappedBuffer.java | 6 ++--- .../gl/buffer/MappedBufferUsage.java | 2 +- .../{ => backend}/gl/error/GlError.java | 2 +- .../{ => backend}/gl/error/GlException.java | 2 +- .../gl}/layout/BufferLayout.java | 4 ++-- .../gl}/layout/CommonItems.java | 10 ++++----- .../{lib => backend/gl}/layout/InputType.java | 8 +++---- .../gl}/layout/LayoutItem.java | 2 +- .../{lib => backend/gl}/layout/MatInput.java | 12 +++++----- .../{lib => backend/gl}/layout/VecInput.java | 8 +++---- .../{ => backend}/gl/shader/GlProgram.java | 4 ++-- .../{ => backend}/gl/shader/GlShader.java | 4 ++-- .../{ => backend}/gl/shader/ShaderType.java | 2 +- .../{ => backend}/glsl/GlslVersion.java | 2 +- .../{ => backend}/glsl/LoadError.java | 6 ++--- .../{ => backend}/glsl/LoadResult.java | 2 +- .../{ => backend}/glsl/ShaderSources.java | 2 +- .../{ => backend}/glsl/SourceComponent.java | 2 +- .../{ => backend}/glsl/SourceFile.java | 14 ++++++------ .../{ => backend}/glsl/SourceLines.java | 4 ++-- .../glsl/error/ConsoleColors.java | 2 +- .../glsl/error/ErrorBuilder.java | 22 +++++++++---------- .../{ => backend}/glsl/error/ErrorLevel.java | 2 +- .../glsl/error/lines/Divider.java | 2 +- .../glsl/error/lines/ErrorLine.java | 6 ++--- .../glsl/error/lines/FileLine.java | 6 ++--- .../glsl/error/lines/HeaderLine.java | 2 +- .../backend/glsl/error/lines/NestedLine.java | 13 +++++++++++ .../glsl/error/lines/SourceLine.java | 2 +- .../glsl/error/lines/SpanHighlightLine.java | 2 +- .../glsl/error/lines/TextLine.java | 2 +- .../{ => backend}/glsl/generate/BinOp.java | 2 +- .../glsl/generate/FnSignature.java | 2 +- .../glsl/generate/GlslBlock.java | 2 +- .../glsl/generate/GlslBuilder.java | 2 +- .../{ => backend}/glsl/generate/GlslExpr.java | 2 +- .../{ => backend}/glsl/generate/GlslFn.java | 2 +- .../{ => backend}/glsl/generate/GlslStmt.java | 2 +- .../glsl/generate/GlslStruct.java | 2 +- .../glsl/generate/GlslSwitch.java | 2 +- .../glsl/generate/GlslUniformBlock.java | 2 +- .../glsl/generate/GlslVertexInput.java | 2 +- .../{ => backend}/glsl/package-info.java | 2 +- .../{ => backend}/glsl/parse/Import.java | 6 ++--- .../{ => backend}/glsl/parse/ShaderField.java | 6 ++--- .../glsl/parse/ShaderFunction.java | 10 ++++----- .../glsl/parse/ShaderStruct.java | 6 ++--- .../glsl/parse/ShaderVariable.java | 4 ++-- .../{ => backend}/glsl/parse/StructField.java | 4 ++-- .../{ => backend}/glsl/span/CharPos.java | 2 +- .../{ => backend}/glsl/span/ErrorSpan.java | 4 ++-- .../{ => backend}/glsl/span/Span.java | 6 ++--- .../{ => backend}/glsl/span/StringSpan.java | 4 ++-- .../flywheel/glsl/error/lines/NestedLine.java | 13 ----------- .../flywheel/lib/context/Contexts.java | 2 +- .../flywheel/lib/context/SimpleContext.java | 2 +- .../flywheel/lib/instance/InstanceTypes.java | 15 ------------- .../lib/instance/SimpleInstanceType.java | 19 ++-------------- .../flywheel/lib/light/GPULightVolume.java | 4 ++-- .../flywheel/mixin/GlStateManagerMixin.java | 4 ++-- .../{ => backend}/glsl/MockShaderSources.java | 2 +- .../flywheel/{ => backend}/glsl/TestBase.java | 2 +- .../{ => backend}/glsl/TestErrorMessages.java | 4 ++-- .../glsl/TestShaderSourceLoading.java | 4 ++-- 124 files changed, 284 insertions(+), 322 deletions(-) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/Driver.java (60%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/GlCompat.java (98%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/GlFence.java (95%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/GlNumericType.java (94%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/GlObject.java (95%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/GlPrimitive.java (91%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/GlStateTracker.java (94%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/GlTexture.java (93%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/GlTextureUnit.java (95%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/array/GlVertexArray.java (89%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/array/GlVertexArrayDSA.java (97%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/array/GlVertexArrayGL3.java (96%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/array/GlVertexArraySeparateAttributes.java (93%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/array/VertexAttribute.java (89%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/buffer/Buffer.java (96%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/buffer/GlBuffer.java (96%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/buffer/GlBufferType.java (96%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/buffer/GlBufferUsage.java (93%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/buffer/MappedBuffer.java (80%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/buffer/MappedBufferUsage.java (83%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/error/GlError.java (96%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/error/GlException.java (87%) rename src/main/java/com/jozufozu/flywheel/{lib => backend/gl}/layout/BufferLayout.java (94%) rename src/main/java/com/jozufozu/flywheel/{lib => backend/gl}/layout/CommonItems.java (94%) rename src/main/java/com/jozufozu/flywheel/{lib => backend/gl}/layout/InputType.java (53%) rename src/main/java/com/jozufozu/flywheel/{lib => backend/gl}/layout/LayoutItem.java (55%) rename src/main/java/com/jozufozu/flywheel/{lib => backend/gl}/layout/MatInput.java (78%) rename src/main/java/com/jozufozu/flywheel/{lib => backend/gl}/layout/VecInput.java (90%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/shader/GlProgram.java (95%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/shader/GlShader.java (82%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/gl/shader/ShaderType.java (93%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/GlslVersion.java (90%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/LoadError.java (93%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/LoadResult.java (89%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/ShaderSources.java (98%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/SourceComponent.java (83%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/SourceFile.java (94%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/SourceLines.java (97%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/error/ConsoleColors.java (98%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/error/ErrorBuilder.java (85%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/error/ErrorLevel.java (90%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/error/lines/Divider.java (77%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/error/lines/ErrorLine.java (57%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/error/lines/FileLine.java (50%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/error/lines/HeaderLine.java (79%) create mode 100644 src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/NestedLine.java rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/error/lines/SourceLine.java (84%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/error/lines/SpanHighlightLine.java (89%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/error/lines/TextLine.java (67%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/BinOp.java (77%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/FnSignature.java (97%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/GlslBlock.java (93%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/GlslBuilder.java (96%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/GlslExpr.java (98%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/GlslFn.java (92%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/GlslStmt.java (93%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/GlslStruct.java (93%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/GlslSwitch.java (96%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/GlslUniformBlock.java (95%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/generate/GlslVertexInput.java (90%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/package-info.java (79%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/parse/Import.java (83%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/parse/ShaderField.java (91%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/parse/ShaderFunction.java (93%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/parse/ShaderStruct.java (94%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/parse/ShaderVariable.java (88%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/parse/StructField.java (82%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/span/CharPos.java (64%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/span/ErrorSpan.java (85%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/span/Span.java (94%) rename src/main/java/com/jozufozu/flywheel/{ => backend}/glsl/span/StringSpan.java (79%) delete mode 100644 src/main/java/com/jozufozu/flywheel/glsl/error/lines/NestedLine.java rename src/test/java/com/jozufozu/flywheel/{ => backend}/glsl/MockShaderSources.java (95%) rename src/test/java/com/jozufozu/flywheel/{ => backend}/glsl/TestBase.java (97%) rename src/test/java/com/jozufozu/flywheel/{ => backend}/glsl/TestErrorMessages.java (94%) rename src/test/java/com/jozufozu/flywheel/{ => backend}/glsl/TestShaderSourceLoading.java (97%) diff --git a/src/main/java/com/jozufozu/flywheel/api/context/Context.java b/src/main/java/com/jozufozu/flywheel/api/context/Context.java index caa031a5a..b66b008d0 100644 --- a/src/main/java/com/jozufozu/flywheel/api/context/Context.java +++ b/src/main/java/com/jozufozu/flywheel/api/context/Context.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/api/instance/InstanceType.java b/src/main/java/com/jozufozu/flywheel/api/instance/InstanceType.java index 4d317da01..3bc8a04a1 100644 --- a/src/main/java/com/jozufozu/flywheel/api/instance/InstanceType.java +++ b/src/main/java/com/jozufozu/flywheel/api/instance/InstanceType.java @@ -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 create(InstanceHandle handle); - /** - * @return The layout of I when buffered. - * @deprecated Use {@link #layout()} instead. - */ - @Deprecated - BufferLayout oldLayout(); - Layout layout(); InstanceWriter writer(); diff --git a/src/main/java/com/jozufozu/flywheel/backend/Backends.java b/src/main/java/com/jozufozu/flywheel/backend/Backends.java index b079e2f6a..989e23edb 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/Backends.java +++ b/src/main/java/com/jozufozu/flywheel/backend/Backends.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/InternalVertex.java b/src/main/java/com/jozufozu/flywheel/backend/InternalVertex.java index b41e8ee73..97297814d 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/InternalVertex.java +++ b/src/main/java/com/jozufozu/flywheel/backend/InternalVertex.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/CompilationHarness.java b/src/main/java/com/jozufozu/flywheel/backend/compile/CompilationHarness.java index 0ef6b3fef..4ee8adb4a 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/CompilationHarness.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/CompilationHarness.java @@ -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 { private final KeyCompiler compiler; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/Compile.java b/src/main/java/com/jozufozu/flywheel/backend/compile/Compile.java index bd9308ad1..59200a0a8 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/Compile.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/Compile.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/FlwPrograms.java b/src/main/java/com/jozufozu/flywheel/backend/compile/FlwPrograms.java index a0e60ee5d..a863d72d5 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/FlwPrograms.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/FlwPrograms.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/IndirectPrograms.java b/src/main/java/com/jozufozu/flywheel/backend/compile/IndirectPrograms.java index 144273c69..29358404f 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/IndirectPrograms.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/IndirectPrograms.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/InstancingPrograms.java b/src/main/java/com/jozufozu/flywheel/backend/compile/InstancingPrograms.java index 42885213e..8f440cc17 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/InstancingPrograms.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/InstancingPrograms.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/Pipeline.java b/src/main/java/com/jozufozu/flywheel/backend/compile/Pipeline.java index be3b09e2d..6537b205f 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/Pipeline.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/Pipeline.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/PipelineCompiler.java b/src/main/java/com/jozufozu/flywheel/backend/compile/PipelineCompiler.java index 560e2407a..21803ee9f 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/PipelineCompiler.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/PipelineCompiler.java @@ -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 PIPELINE = new Compile<>(); diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/Pipelines.java b/src/main/java/com/jozufozu/flywheel/backend/compile/Pipelines.java index 373215036..17411fed3 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/Pipelines.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/Pipelines.java @@ -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() diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/SourceLoader.java b/src/main/java/com/jozufozu/flywheel/backend/compile/SourceLoader.java index 5b3af8b93..e903293c2 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/SourceLoader.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/SourceLoader.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/component/IndirectComponent.java b/src/main/java/com/jozufozu/flywheel/backend/compile/component/IndirectComponent.java index bc62f1d8e..e2ee491c9 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/component/IndirectComponent.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/component/IndirectComponent.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/component/InstancedArraysComponent.java b/src/main/java/com/jozufozu/flywheel/backend/compile/component/InstancedArraysComponent.java index 79c91a11f..0c01606d1 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/component/InstancedArraysComponent.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/component/InstancedArraysComponent.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/component/StringSubstitutionSourceComponent.java b/src/main/java/com/jozufozu/flywheel/backend/compile/component/StringSubstitutionSourceComponent.java index 3c22e32c4..7d6b4c7a6 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/component/StringSubstitutionSourceComponent.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/component/StringSubstitutionSourceComponent.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/component/UberShaderComponent.java b/src/main/java/com/jozufozu/flywheel/backend/compile/component/UberShaderComponent.java index a55227096..342405e25 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/component/UberShaderComponent.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/component/UberShaderComponent.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/component/UniformComponent.java b/src/main/java/com/jozufozu/flywheel/backend/compile/component/UniformComponent.java index 899389af0..9797c32b3 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/component/UniformComponent.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/component/UniformComponent.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/core/Compilation.java b/src/main/java/com/jozufozu/flywheel/backend/compile/core/Compilation.java index 25406f187..a9377d229 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/core/Compilation.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/core/Compilation.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/core/CompilerStats.java b/src/main/java/com/jozufozu/flywheel/backend/compile/core/CompilerStats.java index 3e8f9ed48..afaedd55b 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/core/CompilerStats.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/core/CompilerStats.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/core/FailedCompilation.java b/src/main/java/com/jozufozu/flywheel/backend/compile/core/FailedCompilation.java index 13789f6c2..a73483d45 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/core/FailedCompilation.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/core/FailedCompilation.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/core/LinkResult.java b/src/main/java/com/jozufozu/flywheel/backend/compile/core/LinkResult.java index bc496c3c3..5ac969d04 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/core/LinkResult.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/core/LinkResult.java @@ -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 diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/core/ProgramLinker.java b/src/main/java/com/jozufozu/flywheel/backend/compile/core/ProgramLinker.java index 424730f46..93359b303 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/core/ProgramLinker.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/core/ProgramLinker.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/core/ShaderCompiler.java b/src/main/java/com/jozufozu/flywheel/backend/compile/core/ShaderCompiler.java index 62407a1ac..d476afc9f 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/core/ShaderCompiler.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/core/ShaderCompiler.java @@ -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 shaderCache = new HashMap<>(); diff --git a/src/main/java/com/jozufozu/flywheel/backend/compile/core/ShaderResult.java b/src/main/java/com/jozufozu/flywheel/backend/compile/core/ShaderResult.java index 480d4ef14..46e6e2af7 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/compile/core/ShaderResult.java +++ b/src/main/java/com/jozufozu/flywheel/backend/compile/core/ShaderResult.java @@ -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 diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/CommonCrumbling.java b/src/main/java/com/jozufozu/flywheel/backend/engine/CommonCrumbling.java index 7cd0eff64..22706e3a0 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/CommonCrumbling.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/CommonCrumbling.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/LayoutAttributes.java b/src/main/java/com/jozufozu/flywheel/backend/engine/LayoutAttributes.java index 291ca2d27..052dbbc35 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/LayoutAttributes.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/LayoutAttributes.java @@ -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 { /** diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/MaterialRenderState.java b/src/main/java/com/jozufozu/flywheel/backend/engine/MaterialRenderState.java index 2b66c1b5d..0eb1636a6 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/MaterialRenderState.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/MaterialRenderState.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/UniformBuffer.java b/src/main/java/com/jozufozu/flywheel/backend/engine/UniformBuffer.java index 90910758a..519da9681 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/UniformBuffer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/UniformBuffer.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectBuffers.java b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectBuffers.java index 65e282046..259b7c1c3 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectBuffers.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectBuffers.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectCullingGroup.java b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectCullingGroup.java index 79c58c20d..f8222bb80 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectCullingGroup.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectCullingGroup.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectDrawManager.java b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectDrawManager.java index 862ba229b..ea64cc5d4 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectDrawManager.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectDrawManager.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectEngine.java b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectEngine.java index f855836d6..5cf147b1a 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectEngine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectEngine.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectMeshPool.java b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectMeshPool.java index c134f9428..aa70bb5d6 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectMeshPool.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/IndirectMeshPool.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/ResizableStorageBuffer.java b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/ResizableStorageBuffer.java index 3750193f1..26d191a25 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/ResizableStorageBuffer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/ResizableStorageBuffer.java @@ -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; /** diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/StagingBuffer.java b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/StagingBuffer.java index db787957a..1e66b2c12 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/StagingBuffer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/indirect/StagingBuffer.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/DrawCall.java b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/DrawCall.java index ada838275..12836326f 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/DrawCall.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/DrawCall.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/EboCache.java b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/EboCache.java index 6f644cb51..6b4b21abb 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/EboCache.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/EboCache.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedCrumbling.java b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedCrumbling.java index 112b1cbaa..a546c6e8c 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedCrumbling.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedCrumbling.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedInstancer.java b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedInstancer.java index 7139e4c91..d8f29bca1 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedInstancer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedInstancer.java @@ -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 extends AbstractInstancer { private final List instanceAttributes; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedMeshPool.java b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedMeshPool.java index daff7502c..b326c9539 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedMeshPool.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancedMeshPool.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancingEngine.java b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancingEngine.java index ea043ea88..0abf6ef73 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancingEngine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/engine/instancing/InstancingEngine.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/gl/Driver.java b/src/main/java/com/jozufozu/flywheel/backend/gl/Driver.java similarity index 60% rename from src/main/java/com/jozufozu/flywheel/gl/Driver.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/Driver.java index 54fbc87fe..939b78aea 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/Driver.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/Driver.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.gl; +package com.jozufozu.flywheel.backend.gl; public enum Driver { NVIDIA, diff --git a/src/main/java/com/jozufozu/flywheel/gl/GlCompat.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlCompat.java similarity index 98% rename from src/main/java/com/jozufozu/flywheel/gl/GlCompat.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/GlCompat.java index 6305b4666..4704134fc 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/GlCompat.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlCompat.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.gl; +package com.jozufozu.flywheel.backend.gl; import java.nio.ByteBuffer; diff --git a/src/main/java/com/jozufozu/flywheel/gl/GlFence.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlFence.java similarity index 95% rename from src/main/java/com/jozufozu/flywheel/gl/GlFence.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/GlFence.java index e1ab94fd8..67ce6ffe0 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/GlFence.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlFence.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/gl/GlNumericType.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlNumericType.java similarity index 94% rename from src/main/java/com/jozufozu/flywheel/gl/GlNumericType.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/GlNumericType.java index 19f99c42c..6cac1f448 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/GlNumericType.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlNumericType.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.gl; +package com.jozufozu.flywheel.backend.gl; import org.lwjgl.opengl.GL11; diff --git a/src/main/java/com/jozufozu/flywheel/gl/GlObject.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlObject.java similarity index 95% rename from src/main/java/com/jozufozu/flywheel/gl/GlObject.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/GlObject.java index eec6ef813..c86581e6b 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/GlObject.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlObject.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/gl/GlPrimitive.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlPrimitive.java similarity index 91% rename from src/main/java/com/jozufozu/flywheel/gl/GlPrimitive.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/GlPrimitive.java index dad5b843a..71a8d5353 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/GlPrimitive.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlPrimitive.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.gl; +package com.jozufozu.flywheel.backend.gl; import org.lwjgl.opengl.GL11; diff --git a/src/main/java/com/jozufozu/flywheel/gl/GlStateTracker.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlStateTracker.java similarity index 94% rename from src/main/java/com/jozufozu/flywheel/gl/GlStateTracker.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/GlStateTracker.java index 800286c05..0e3012c2e 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/GlStateTracker.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlStateTracker.java @@ -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; /** diff --git a/src/main/java/com/jozufozu/flywheel/gl/GlTexture.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlTexture.java similarity index 93% rename from src/main/java/com/jozufozu/flywheel/gl/GlTexture.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/GlTexture.java index 97a8defa1..901df99af 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/GlTexture.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlTexture.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.gl; +package com.jozufozu.flywheel.backend.gl; import org.lwjgl.opengl.GL20; diff --git a/src/main/java/com/jozufozu/flywheel/gl/GlTextureUnit.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlTextureUnit.java similarity index 95% rename from src/main/java/com/jozufozu/flywheel/gl/GlTextureUnit.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/GlTextureUnit.java index b3ae91bb9..c599c3cb4 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/GlTextureUnit.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlTextureUnit.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.gl; +package com.jozufozu.flywheel.backend.gl; import static org.lwjgl.opengl.GL13.GL_TEXTURE0; diff --git a/src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArray.java b/src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArray.java similarity index 89% rename from src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArray.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArray.java index c45a90cf3..463ebf549 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArray.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArray.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArrayDSA.java b/src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArrayDSA.java similarity index 97% rename from src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArrayDSA.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArrayDSA.java index ddddc224d..fd5c11190 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArrayDSA.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArrayDSA.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArrayGL3.java b/src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArrayGL3.java similarity index 96% rename from src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArrayGL3.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArrayGL3.java index dfbb2f0f6..98065c88d 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArrayGL3.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArrayGL3.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArraySeparateAttributes.java b/src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArraySeparateAttributes.java similarity index 93% rename from src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArraySeparateAttributes.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArraySeparateAttributes.java index 466d73f03..7f930bb6b 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/array/GlVertexArraySeparateAttributes.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/array/GlVertexArraySeparateAttributes.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/gl/array/VertexAttribute.java b/src/main/java/com/jozufozu/flywheel/backend/gl/array/VertexAttribute.java similarity index 89% rename from src/main/java/com/jozufozu/flywheel/gl/array/VertexAttribute.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/array/VertexAttribute.java index 05ddef78e..8f7b7b407 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/array/VertexAttribute.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/array/VertexAttribute.java @@ -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(); diff --git a/src/main/java/com/jozufozu/flywheel/gl/buffer/Buffer.java b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/Buffer.java similarity index 96% rename from src/main/java/com/jozufozu/flywheel/gl/buffer/Buffer.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/buffer/Buffer.java index f2e4bb65f..9f5432ec3 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/buffer/Buffer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/Buffer.java @@ -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(); diff --git a/src/main/java/com/jozufozu/flywheel/gl/buffer/GlBuffer.java b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/GlBuffer.java similarity index 96% rename from src/main/java/com/jozufozu/flywheel/gl/buffer/GlBuffer.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/buffer/GlBuffer.java index 0085e0b2b..7566635bf 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/buffer/GlBuffer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/GlBuffer.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/gl/buffer/GlBufferType.java b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/GlBufferType.java similarity index 96% rename from src/main/java/com/jozufozu/flywheel/gl/buffer/GlBufferType.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/buffer/GlBufferType.java index 179759307..cd013b576 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/buffer/GlBufferType.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/GlBufferType.java @@ -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), diff --git a/src/main/java/com/jozufozu/flywheel/gl/buffer/GlBufferUsage.java b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/GlBufferUsage.java similarity index 93% rename from src/main/java/com/jozufozu/flywheel/gl/buffer/GlBufferUsage.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/buffer/GlBufferUsage.java index 3ee63ef22..ef1a716fb 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/buffer/GlBufferUsage.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/GlBufferUsage.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.gl.buffer; +package com.jozufozu.flywheel.backend.gl.buffer; import org.lwjgl.opengl.GL15; diff --git a/src/main/java/com/jozufozu/flywheel/gl/buffer/MappedBuffer.java b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/MappedBuffer.java similarity index 80% rename from src/main/java/com/jozufozu/flywheel/gl/buffer/MappedBuffer.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/buffer/MappedBuffer.java index 51bdc1a10..5328ba85e 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/buffer/MappedBuffer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/MappedBuffer.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/gl/buffer/MappedBufferUsage.java b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/MappedBufferUsage.java similarity index 83% rename from src/main/java/com/jozufozu/flywheel/gl/buffer/MappedBufferUsage.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/buffer/MappedBufferUsage.java index b38a83788..30e60a348 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/buffer/MappedBufferUsage.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/MappedBufferUsage.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.gl.buffer; +package com.jozufozu.flywheel.backend.gl.buffer; import org.lwjgl.opengl.GL15C; diff --git a/src/main/java/com/jozufozu/flywheel/gl/error/GlError.java b/src/main/java/com/jozufozu/flywheel/backend/gl/error/GlError.java similarity index 96% rename from src/main/java/com/jozufozu/flywheel/gl/error/GlError.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/error/GlError.java index 03e79a1b5..a0cdbded8 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/error/GlError.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/error/GlError.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.gl.error; +package com.jozufozu.flywheel.backend.gl.error; import java.util.function.Supplier; diff --git a/src/main/java/com/jozufozu/flywheel/gl/error/GlException.java b/src/main/java/com/jozufozu/flywheel/backend/gl/error/GlException.java similarity index 87% rename from src/main/java/com/jozufozu/flywheel/gl/error/GlException.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/error/GlException.java index cfa202228..ac856a5f1 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/error/GlException.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/error/GlException.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.gl.error; +package com.jozufozu.flywheel.backend.gl.error; public class GlException extends RuntimeException { diff --git a/src/main/java/com/jozufozu/flywheel/lib/layout/BufferLayout.java b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/BufferLayout.java similarity index 94% rename from src/main/java/com/jozufozu/flywheel/lib/layout/BufferLayout.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/layout/BufferLayout.java index f074df1b0..b514e300c 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/layout/BufferLayout.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/BufferLayout.java @@ -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. diff --git a/src/main/java/com/jozufozu/flywheel/lib/layout/CommonItems.java b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/CommonItems.java similarity index 94% rename from src/main/java/com/jozufozu/flywheel/lib/layout/CommonItems.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/layout/CommonItems.java index 9a8c1fbe2..6576a5072 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/layout/CommonItems.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/CommonItems.java @@ -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"; diff --git a/src/main/java/com/jozufozu/flywheel/lib/layout/InputType.java b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/InputType.java similarity index 53% rename from src/main/java/com/jozufozu/flywheel/lib/layout/InputType.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/layout/InputType.java index 1bbf67a8f..199f49199 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/layout/InputType.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/InputType.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/lib/layout/LayoutItem.java b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/LayoutItem.java similarity index 55% rename from src/main/java/com/jozufozu/flywheel/lib/layout/LayoutItem.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/layout/LayoutItem.java index 5bc8c082d..a46b0f4d5 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/layout/LayoutItem.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/LayoutItem.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.lib.layout; +package com.jozufozu.flywheel.backend.gl.layout; public record LayoutItem(InputType type, String name) { diff --git a/src/main/java/com/jozufozu/flywheel/lib/layout/MatInput.java b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/MatInput.java similarity index 78% rename from src/main/java/com/jozufozu/flywheel/lib/layout/MatInput.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/layout/MatInput.java index d5a4e9ab5..5d6a1a5f9 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/layout/MatInput.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/MatInput.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/lib/layout/VecInput.java b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/VecInput.java similarity index 90% rename from src/main/java/com/jozufozu/flywheel/lib/layout/VecInput.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/layout/VecInput.java index 6878364f5..32d8daf49 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/layout/VecInput.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/layout/VecInput.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/gl/shader/GlProgram.java b/src/main/java/com/jozufozu/flywheel/backend/gl/shader/GlProgram.java similarity index 95% rename from src/main/java/com/jozufozu/flywheel/gl/shader/GlProgram.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/shader/GlProgram.java index 4d60acd3b..308e39645 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/shader/GlProgram.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/shader/GlProgram.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/gl/shader/GlShader.java b/src/main/java/com/jozufozu/flywheel/backend/gl/shader/GlShader.java similarity index 82% rename from src/main/java/com/jozufozu/flywheel/gl/shader/GlShader.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/shader/GlShader.java index e27cb4a43..6c6f484e4 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/shader/GlShader.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/shader/GlShader.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/gl/shader/ShaderType.java b/src/main/java/com/jozufozu/flywheel/backend/gl/shader/ShaderType.java similarity index 93% rename from src/main/java/com/jozufozu/flywheel/gl/shader/ShaderType.java rename to src/main/java/com/jozufozu/flywheel/backend/gl/shader/ShaderType.java index 6a3d16471..f5b106232 100644 --- a/src/main/java/com/jozufozu/flywheel/gl/shader/ShaderType.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/shader/ShaderType.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/GlslVersion.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/GlslVersion.java similarity index 90% rename from src/main/java/com/jozufozu/flywheel/glsl/GlslVersion.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/GlslVersion.java index d3cbe62c0..28022f76f 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/GlslVersion.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/GlslVersion.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl; +package com.jozufozu.flywheel.backend.glsl; public enum GlslVersion { V110(110), diff --git a/src/main/java/com/jozufozu/flywheel/glsl/LoadError.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/LoadError.java similarity index 93% rename from src/main/java/com/jozufozu/flywheel/glsl/LoadError.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/LoadError.java index 111b91cdd..bf002fd56 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/LoadError.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/LoadError.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/LoadResult.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/LoadResult.java similarity index 89% rename from src/main/java/com/jozufozu/flywheel/glsl/LoadResult.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/LoadResult.java index bd32a0940..e566ec2e5 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/LoadResult.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/LoadResult.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/ShaderSources.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/ShaderSources.java similarity index 98% rename from src/main/java/com/jozufozu/flywheel/glsl/ShaderSources.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/ShaderSources.java index 5a0f7f088..da73b7632 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/ShaderSources.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/ShaderSources.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl; +package com.jozufozu.flywheel.backend.glsl; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/SourceComponent.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/SourceComponent.java similarity index 83% rename from src/main/java/com/jozufozu/flywheel/glsl/SourceComponent.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/SourceComponent.java index c0cdd38aa..55cdbe00d 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/SourceComponent.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/SourceComponent.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl; +package com.jozufozu.flywheel.backend.glsl; import java.util.Collection; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/SourceFile.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/SourceFile.java similarity index 94% rename from src/main/java/com/jozufozu/flywheel/glsl/SourceFile.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/SourceFile.java index 8bf72897a..2485af853 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/SourceFile.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/SourceFile.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/SourceLines.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/SourceLines.java similarity index 97% rename from src/main/java/com/jozufozu/flywheel/glsl/SourceLines.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/SourceLines.java index d9613b915..474852274 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/SourceLines.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/SourceLines.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/ConsoleColors.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/ConsoleColors.java similarity index 98% rename from src/main/java/com/jozufozu/flywheel/glsl/error/ConsoleColors.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/error/ConsoleColors.java index 3325ab15d..3bcb1b316 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/ConsoleColors.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/ConsoleColors.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/ErrorBuilder.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/ErrorBuilder.java similarity index 85% rename from src/main/java/com/jozufozu/flywheel/glsl/error/ErrorBuilder.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/error/ErrorBuilder.java index 1581e8811..ed8596265 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/ErrorBuilder.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/ErrorBuilder.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/ErrorLevel.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/ErrorLevel.java similarity index 90% rename from src/main/java/com/jozufozu/flywheel/glsl/error/ErrorLevel.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/error/ErrorLevel.java index 130cb3ec0..c0b8a54ff 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/ErrorLevel.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/ErrorLevel.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl.error; +package com.jozufozu.flywheel.backend.glsl.error; public enum ErrorLevel { WARN(ConsoleColors.YELLOW, "warn"), diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/Divider.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/Divider.java similarity index 77% rename from src/main/java/com/jozufozu/flywheel/glsl/error/lines/Divider.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/Divider.java index 92115a5f5..9d2db60bf 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/Divider.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/Divider.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl.error.lines; +package com.jozufozu.flywheel.backend.glsl.error.lines; public enum Divider { BAR(" | "), diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/ErrorLine.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/ErrorLine.java similarity index 57% rename from src/main/java/com/jozufozu/flywheel/glsl/error/lines/ErrorLine.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/ErrorLine.java index a037f4de1..906213306 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/ErrorLine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/ErrorLine.java @@ -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() { diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/FileLine.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/FileLine.java similarity index 50% rename from src/main/java/com/jozufozu/flywheel/glsl/error/lines/FileLine.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/FileLine.java index d3167e9ce..113cd97ad 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/FileLine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/FileLine.java @@ -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 diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/HeaderLine.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/HeaderLine.java similarity index 79% rename from src/main/java/com/jozufozu/flywheel/glsl/error/lines/HeaderLine.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/HeaderLine.java index 3246f2b21..99c0e635e 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/HeaderLine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/HeaderLine.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/NestedLine.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/NestedLine.java new file mode 100644 index 000000000..50a929c4c --- /dev/null +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/NestedLine.java @@ -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; + } +} diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/SourceLine.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/SourceLine.java similarity index 84% rename from src/main/java/com/jozufozu/flywheel/glsl/error/lines/SourceLine.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/SourceLine.java index 81fe5fc64..9b540359f 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/SourceLine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/SourceLine.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/SpanHighlightLine.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/SpanHighlightLine.java similarity index 89% rename from src/main/java/com/jozufozu/flywheel/glsl/error/lines/SpanHighlightLine.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/SpanHighlightLine.java index 46304a247..5d622ba9f 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/SpanHighlightLine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/SpanHighlightLine.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/TextLine.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/TextLine.java similarity index 67% rename from src/main/java/com/jozufozu/flywheel/glsl/error/lines/TextLine.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/TextLine.java index 8f61f836b..0a3f7fae3 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/TextLine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/error/lines/TextLine.java @@ -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 { diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/BinOp.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/BinOp.java similarity index 77% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/BinOp.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/BinOp.java index 27bea127e..d3f883454 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/BinOp.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/BinOp.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl.generate; +package com.jozufozu.flywheel.backend.glsl.generate; public enum BinOp { BITWISE_AND("&"), diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/FnSignature.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/FnSignature.java similarity index 97% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/FnSignature.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/FnSignature.java index a23cf92b3..d1982daaf 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/FnSignature.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/FnSignature.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslBlock.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslBlock.java similarity index 93% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/GlslBlock.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslBlock.java index f78fed81d..973a05584 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslBlock.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslBlock.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslBuilder.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslBuilder.java similarity index 96% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/GlslBuilder.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslBuilder.java index 4917d782c..5d6257a38 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslBuilder.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslBuilder.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslExpr.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslExpr.java similarity index 98% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/GlslExpr.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslExpr.java index 801c4f79a..4182e9e7b 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslExpr.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslExpr.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslFn.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslFn.java similarity index 92% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/GlslFn.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslFn.java index d36c16ce8..b9b801ce5 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslFn.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslFn.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl.generate; +package com.jozufozu.flywheel.backend.glsl.generate; import java.util.function.Consumer; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslStmt.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslStmt.java similarity index 93% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/GlslStmt.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslStmt.java index 4ce45d6d8..01c227949 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslStmt.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslStmt.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl.generate; +package com.jozufozu.flywheel.backend.glsl.generate; public interface GlslStmt { GlslStmt BREAK = () -> "break;"; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslStruct.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslStruct.java similarity index 93% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/GlslStruct.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslStruct.java index c04811687..a4298440d 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslStruct.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslStruct.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslSwitch.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslSwitch.java similarity index 96% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/GlslSwitch.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslSwitch.java index d21a36711..1e97684a2 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslSwitch.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslSwitch.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslUniformBlock.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslUniformBlock.java similarity index 95% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/GlslUniformBlock.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslUniformBlock.java index 420392215..a5917c466 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslUniformBlock.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslUniformBlock.java @@ -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; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslVertexInput.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslVertexInput.java similarity index 90% rename from src/main/java/com/jozufozu/flywheel/glsl/generate/GlslVertexInput.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslVertexInput.java index 254e0b16a..0997b1c50 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/generate/GlslVertexInput.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/generate/GlslVertexInput.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl.generate; +package com.jozufozu.flywheel.backend.glsl.generate; public class GlslVertexInput implements GlslBuilder.Declaration { diff --git a/src/main/java/com/jozufozu/flywheel/glsl/package-info.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/package-info.java similarity index 79% rename from src/main/java/com/jozufozu/flywheel/glsl/package-info.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/package-info.java index 388ebb866..2729fb3ed 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/package-info.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/package-info.java @@ -1,5 +1,5 @@ @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault -package com.jozufozu.flywheel.glsl; +package com.jozufozu.flywheel.backend.glsl; import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/jozufozu/flywheel/glsl/parse/Import.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/Import.java similarity index 83% rename from src/main/java/com/jozufozu/flywheel/glsl/parse/Import.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/parse/Import.java index 664a6ec11..b189dfd62 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/parse/Import.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/Import.java @@ -1,11 +1,11 @@ -package com.jozufozu.flywheel.glsl.parse; +package com.jozufozu.flywheel.backend.glsl.parse; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.google.common.collect.ImmutableList; -import com.jozufozu.flywheel.glsl.SourceLines; -import com.jozufozu.flywheel.glsl.span.Span; +import com.jozufozu.flywheel.backend.glsl.SourceLines; +import com.jozufozu.flywheel.backend.glsl.span.Span; public record Import(Span self, Span file) { public static final Pattern PATTERN = Pattern.compile("^\\s*#\\s*include\\s+\"(.*)\"", Pattern.MULTILINE); diff --git a/src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderField.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderField.java similarity index 91% rename from src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderField.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderField.java index 5723f54cf..772466830 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderField.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderField.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl.parse; +package com.jozufozu.flywheel.backend.glsl.parse; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -6,8 +6,8 @@ import java.util.regex.Pattern; import org.jetbrains.annotations.Nullable; import com.google.common.collect.ImmutableMap; -import com.jozufozu.flywheel.glsl.SourceLines; -import com.jozufozu.flywheel.glsl.span.Span; +import com.jozufozu.flywheel.backend.glsl.SourceLines; +import com.jozufozu.flywheel.backend.glsl.span.Span; public class ShaderField { public static final Pattern PATTERN = Pattern.compile("layout\\s*\\(location\\s*=\\s*(\\d+)\\)\\s+(in|out)\\s+([\\w\\d]+)\\s+" + "([\\w\\d]+)"); diff --git a/src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderFunction.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderFunction.java similarity index 93% rename from src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderFunction.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderFunction.java index 45298cbd9..61f0e8c51 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderFunction.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderFunction.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl.parse; +package com.jozufozu.flywheel.backend.glsl.parse; import java.util.HashMap; import java.util.Map; @@ -8,10 +8,10 @@ import java.util.stream.Collectors; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import com.jozufozu.flywheel.glsl.SourceLines; -import com.jozufozu.flywheel.glsl.span.ErrorSpan; -import com.jozufozu.flywheel.glsl.span.Span; -import com.jozufozu.flywheel.glsl.span.StringSpan; +import com.jozufozu.flywheel.backend.glsl.SourceLines; +import com.jozufozu.flywheel.backend.glsl.span.ErrorSpan; +import com.jozufozu.flywheel.backend.glsl.span.Span; +import com.jozufozu.flywheel.backend.glsl.span.StringSpan; public class ShaderFunction { // https://regexr.com/60n3d diff --git a/src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderStruct.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderStruct.java similarity index 94% rename from src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderStruct.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderStruct.java index aa139d792..9047af3a5 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderStruct.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderStruct.java @@ -1,12 +1,12 @@ -package com.jozufozu.flywheel.glsl.parse; +package com.jozufozu.flywheel.backend.glsl.parse; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import com.jozufozu.flywheel.glsl.SourceLines; -import com.jozufozu.flywheel.glsl.span.Span; +import com.jozufozu.flywheel.backend.glsl.SourceLines; +import com.jozufozu.flywheel.backend.glsl.span.Span; public class ShaderStruct { diff --git a/src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderVariable.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderVariable.java similarity index 88% rename from src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderVariable.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderVariable.java index 86e6da484..9a1a0dc44 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/parse/ShaderVariable.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/ShaderVariable.java @@ -1,6 +1,6 @@ -package com.jozufozu.flywheel.glsl.parse; +package com.jozufozu.flywheel.backend.glsl.parse; -import com.jozufozu.flywheel.glsl.span.Span; +import com.jozufozu.flywheel.backend.glsl.span.Span; public class ShaderVariable { diff --git a/src/main/java/com/jozufozu/flywheel/glsl/parse/StructField.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/StructField.java similarity index 82% rename from src/main/java/com/jozufozu/flywheel/glsl/parse/StructField.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/parse/StructField.java index 53595916c..98df1161e 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/parse/StructField.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/parse/StructField.java @@ -1,8 +1,8 @@ -package com.jozufozu.flywheel.glsl.parse; +package com.jozufozu.flywheel.backend.glsl.parse; import java.util.regex.Pattern; -import com.jozufozu.flywheel.glsl.span.Span; +import com.jozufozu.flywheel.backend.glsl.span.Span; public class StructField { public static final Pattern fieldPattern = Pattern.compile("(\\S+)\\s*(\\S+);"); diff --git a/src/main/java/com/jozufozu/flywheel/glsl/span/CharPos.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/span/CharPos.java similarity index 64% rename from src/main/java/com/jozufozu/flywheel/glsl/span/CharPos.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/span/CharPos.java index ad9111039..cb1e08b0f 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/span/CharPos.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/span/CharPos.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl.span; +package com.jozufozu.flywheel.backend.glsl.span; /** * A position in a file. diff --git a/src/main/java/com/jozufozu/flywheel/glsl/span/ErrorSpan.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/span/ErrorSpan.java similarity index 85% rename from src/main/java/com/jozufozu/flywheel/glsl/span/ErrorSpan.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/span/ErrorSpan.java index 3a34cc408..25a97cac3 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/span/ErrorSpan.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/span/ErrorSpan.java @@ -1,6 +1,6 @@ -package com.jozufozu.flywheel.glsl.span; +package com.jozufozu.flywheel.backend.glsl.span; -import com.jozufozu.flywheel.glsl.SourceLines; +import com.jozufozu.flywheel.backend.glsl.SourceLines; /** * Represents a (syntactically) malformed segment of code. diff --git a/src/main/java/com/jozufozu/flywheel/glsl/span/Span.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/span/Span.java similarity index 94% rename from src/main/java/com/jozufozu/flywheel/glsl/span/Span.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/span/Span.java index 5f13578c8..b0da73a77 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/span/Span.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/span/Span.java @@ -1,11 +1,11 @@ -package com.jozufozu.flywheel.glsl.span; +package com.jozufozu.flywheel.backend.glsl.span; import java.util.regex.Matcher; import org.jetbrains.annotations.NotNull; -import com.jozufozu.flywheel.glsl.SourceFile; -import com.jozufozu.flywheel.glsl.SourceLines; +import com.jozufozu.flywheel.backend.glsl.SourceFile; +import com.jozufozu.flywheel.backend.glsl.SourceLines; /** * A segment of code in a {@link SourceFile}. diff --git a/src/main/java/com/jozufozu/flywheel/glsl/span/StringSpan.java b/src/main/java/com/jozufozu/flywheel/backend/glsl/span/StringSpan.java similarity index 79% rename from src/main/java/com/jozufozu/flywheel/glsl/span/StringSpan.java rename to src/main/java/com/jozufozu/flywheel/backend/glsl/span/StringSpan.java index 1ebc228be..25cb5e1a9 100644 --- a/src/main/java/com/jozufozu/flywheel/glsl/span/StringSpan.java +++ b/src/main/java/com/jozufozu/flywheel/backend/glsl/span/StringSpan.java @@ -1,6 +1,6 @@ -package com.jozufozu.flywheel.glsl.span; +package com.jozufozu.flywheel.backend.glsl.span; -import com.jozufozu.flywheel.glsl.SourceLines; +import com.jozufozu.flywheel.backend.glsl.SourceLines; public class StringSpan extends Span { diff --git a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/NestedLine.java b/src/main/java/com/jozufozu/flywheel/glsl/error/lines/NestedLine.java deleted file mode 100644 index 2a2db1635..000000000 --- a/src/main/java/com/jozufozu/flywheel/glsl/error/lines/NestedLine.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.jozufozu.flywheel.glsl.error.lines; - -public record NestedLine(String right) implements ErrorLine { - @Override - public String right() { - return right; - } - - @Override - public Divider divider() { - return Divider.EQUALS; - } -} diff --git a/src/main/java/com/jozufozu/flywheel/lib/context/Contexts.java b/src/main/java/com/jozufozu/flywheel/lib/context/Contexts.java index d0b9d871f..f54ff4bb8 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/context/Contexts.java +++ b/src/main/java/com/jozufozu/flywheel/lib/context/Contexts.java @@ -4,7 +4,7 @@ import org.jetbrains.annotations.ApiStatus; import com.jozufozu.flywheel.Flywheel; import com.jozufozu.flywheel.api.context.Context; -import com.jozufozu.flywheel.gl.shader.GlProgram; +import com.jozufozu.flywheel.backend.gl.shader.GlProgram; public final class Contexts { public static final SimpleContext DEFAULT = Context.REGISTRY.registerAndGet(new SimpleContext( diff --git a/src/main/java/com/jozufozu/flywheel/lib/context/SimpleContext.java b/src/main/java/com/jozufozu/flywheel/lib/context/SimpleContext.java index c3603149c..cac83824f 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/context/SimpleContext.java +++ b/src/main/java/com/jozufozu/flywheel/lib/context/SimpleContext.java @@ -3,7 +3,7 @@ package com.jozufozu.flywheel.lib.context; import java.util.function.Consumer; import com.jozufozu.flywheel.api.context.Context; -import com.jozufozu.flywheel.gl.shader.GlProgram; +import com.jozufozu.flywheel.backend.gl.shader.GlProgram; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/com/jozufozu/flywheel/lib/instance/InstanceTypes.java b/src/main/java/com/jozufozu/flywheel/lib/instance/InstanceTypes.java index 4b66ca51e..f0c3a6c39 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/instance/InstanceTypes.java +++ b/src/main/java/com/jozufozu/flywheel/lib/instance/InstanceTypes.java @@ -7,17 +7,9 @@ import com.jozufozu.flywheel.api.instance.InstanceType; import com.jozufozu.flywheel.api.layout.FloatRepr; import com.jozufozu.flywheel.api.layout.IntegerRepr; import com.jozufozu.flywheel.api.layout.LayoutBuilder; -import com.jozufozu.flywheel.lib.layout.BufferLayout; -import com.jozufozu.flywheel.lib.layout.CommonItems; public final class InstanceTypes { public static final InstanceType TRANSFORMED = SimpleInstanceType.builder(TransformedInstance::new) - .bufferLayout(BufferLayout.builder() - .addItem(CommonItems.LIGHT_COORD, "light") - .addItem(CommonItems.UNORM_4x8, "color") - .addItem(CommonItems.MAT4, "pose") - .addItem(CommonItems.MAT3, "normal") - .build()) .layout(LayoutBuilder.create() .vector("light", IntegerRepr.SHORT, 2) .vector("color", FloatRepr.NORMALIZED_UNSIGNED_BYTE, 4) @@ -30,13 +22,6 @@ public final class InstanceTypes { .register(); public static final InstanceType ORIENTED = SimpleInstanceType.builder(OrientedInstance::new) - .bufferLayout(BufferLayout.builder() - .addItem(CommonItems.LIGHT_COORD, "light") - .addItem(CommonItems.UNORM_4x8, "color") - .addItem(CommonItems.VEC3, "position") - .addItem(CommonItems.VEC3, "pivot") - .addItem(CommonItems.VEC4, "rotation") - .build()) .layout(LayoutBuilder.create() .vector("light", IntegerRepr.SHORT, 2) .vector("color", FloatRepr.NORMALIZED_UNSIGNED_BYTE, 4) diff --git a/src/main/java/com/jozufozu/flywheel/lib/instance/SimpleInstanceType.java b/src/main/java/com/jozufozu/flywheel/lib/instance/SimpleInstanceType.java index dda1ec476..5cd94e01a 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/instance/SimpleInstanceType.java +++ b/src/main/java/com/jozufozu/flywheel/lib/instance/SimpleInstanceType.java @@ -7,21 +7,18 @@ import com.jozufozu.flywheel.api.instance.InstanceHandle; import com.jozufozu.flywheel.api.instance.InstanceType; import com.jozufozu.flywheel.api.instance.InstanceWriter; import com.jozufozu.flywheel.api.layout.Layout; -import com.jozufozu.flywheel.lib.layout.BufferLayout; import net.minecraft.resources.ResourceLocation; public class SimpleInstanceType implements InstanceType { private final Factory factory; - private final BufferLayout bufferLayout; private final Layout layout; private final InstanceWriter writer; private final ResourceLocation vertexShader; private final ResourceLocation cullShader; - public SimpleInstanceType(Factory factory, BufferLayout bufferLayout, Layout layout, InstanceWriter writer, ResourceLocation vertexShader, ResourceLocation cullShader) { + public SimpleInstanceType(Factory factory, Layout layout, InstanceWriter writer, ResourceLocation vertexShader, ResourceLocation cullShader) { this.factory = factory; - this.bufferLayout = bufferLayout; this.layout = layout; this.writer = writer; this.vertexShader = vertexShader; @@ -37,11 +34,6 @@ public class SimpleInstanceType implements InstanceType { return factory.create(this, handle); } - @Override - public BufferLayout oldLayout() { - return bufferLayout; - } - @Override public Layout layout() { return layout; @@ -69,7 +61,6 @@ public class SimpleInstanceType implements InstanceType { public static class Builder { private final Factory factory; - private BufferLayout bufferLayout; private Layout layout; private InstanceWriter writer; private ResourceLocation vertexShader; @@ -79,11 +70,6 @@ public class SimpleInstanceType implements InstanceType { this.factory = factory; } - public Builder bufferLayout(BufferLayout bufferLayout) { - this.bufferLayout = bufferLayout; - return this; - } - public Builder layout(Layout layout) { this.layout = layout; return this; @@ -105,13 +91,12 @@ public class SimpleInstanceType implements InstanceType { } public SimpleInstanceType register() { - Objects.requireNonNull(bufferLayout); Objects.requireNonNull(layout); Objects.requireNonNull(writer); Objects.requireNonNull(vertexShader); Objects.requireNonNull(cullShader); - var out = new SimpleInstanceType<>(factory, bufferLayout, layout, writer, vertexShader, cullShader); + var out = new SimpleInstanceType<>(factory, layout, writer, vertexShader, cullShader); return InstanceType.REGISTRY.registerAndGet(out); } } diff --git a/src/main/java/com/jozufozu/flywheel/lib/light/GPULightVolume.java b/src/main/java/com/jozufozu/flywheel/lib/light/GPULightVolume.java index 213a18a1d..3e18aa377 100644 --- a/src/main/java/com/jozufozu/flywheel/lib/light/GPULightVolume.java +++ b/src/main/java/com/jozufozu/flywheel/lib/light/GPULightVolume.java @@ -21,8 +21,8 @@ import static org.lwjgl.opengl.GL14.GL_MIRRORED_REPEAT; import org.lwjgl.opengl.GL30; -import com.jozufozu.flywheel.gl.GlTexture; -import com.jozufozu.flywheel.gl.GlTextureUnit; +import com.jozufozu.flywheel.backend.gl.GlTexture; +import com.jozufozu.flywheel.backend.gl.GlTextureUnit; import com.jozufozu.flywheel.lib.box.Box; import com.jozufozu.flywheel.lib.box.MutableBox; diff --git a/src/main/java/com/jozufozu/flywheel/mixin/GlStateManagerMixin.java b/src/main/java/com/jozufozu/flywheel/mixin/GlStateManagerMixin.java index f236ce080..644098384 100644 --- a/src/main/java/com/jozufozu/flywheel/mixin/GlStateManagerMixin.java +++ b/src/main/java/com/jozufozu/flywheel/mixin/GlStateManagerMixin.java @@ -5,8 +5,8 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import com.jozufozu.flywheel.gl.GlStateTracker; -import com.jozufozu.flywheel.gl.buffer.GlBufferType; +import com.jozufozu.flywheel.backend.gl.GlStateTracker; +import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType; import com.mojang.blaze3d.platform.GlStateManager; @Mixin(GlStateManager.class) diff --git a/src/test/java/com/jozufozu/flywheel/glsl/MockShaderSources.java b/src/test/java/com/jozufozu/flywheel/backend/glsl/MockShaderSources.java similarity index 95% rename from src/test/java/com/jozufozu/flywheel/glsl/MockShaderSources.java rename to src/test/java/com/jozufozu/flywheel/backend/glsl/MockShaderSources.java index 2d686eadf..db4966b99 100644 --- a/src/test/java/com/jozufozu/flywheel/glsl/MockShaderSources.java +++ b/src/test/java/com/jozufozu/flywheel/backend/glsl/MockShaderSources.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl; +package com.jozufozu.flywheel.backend.glsl; import java.io.FileNotFoundException; import java.util.HashMap; diff --git a/src/test/java/com/jozufozu/flywheel/glsl/TestBase.java b/src/test/java/com/jozufozu/flywheel/backend/glsl/TestBase.java similarity index 97% rename from src/test/java/com/jozufozu/flywheel/glsl/TestBase.java rename to src/test/java/com/jozufozu/flywheel/backend/glsl/TestBase.java index 7570c80f5..9b487ef46 100644 --- a/src/test/java/com/jozufozu/flywheel/glsl/TestBase.java +++ b/src/test/java/com/jozufozu/flywheel/backend/glsl/TestBase.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl; +package com.jozufozu.flywheel.backend.glsl; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; diff --git a/src/test/java/com/jozufozu/flywheel/glsl/TestErrorMessages.java b/src/test/java/com/jozufozu/flywheel/backend/glsl/TestErrorMessages.java similarity index 94% rename from src/test/java/com/jozufozu/flywheel/glsl/TestErrorMessages.java rename to src/test/java/com/jozufozu/flywheel/backend/glsl/TestErrorMessages.java index a64ce81b8..642bde3ff 100644 --- a/src/test/java/com/jozufozu/flywheel/glsl/TestErrorMessages.java +++ b/src/test/java/com/jozufozu/flywheel/backend/glsl/TestErrorMessages.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl; +package com.jozufozu.flywheel.backend.glsl; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; @@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import com.jozufozu.flywheel.glsl.error.ErrorBuilder; +import com.jozufozu.flywheel.backend.glsl.error.ErrorBuilder; import net.minecraft.resources.ResourceLocation; diff --git a/src/test/java/com/jozufozu/flywheel/glsl/TestShaderSourceLoading.java b/src/test/java/com/jozufozu/flywheel/backend/glsl/TestShaderSourceLoading.java similarity index 97% rename from src/test/java/com/jozufozu/flywheel/glsl/TestShaderSourceLoading.java rename to src/test/java/com/jozufozu/flywheel/backend/glsl/TestShaderSourceLoading.java index 61106a033..f976f9a6d 100644 --- a/src/test/java/com/jozufozu/flywheel/glsl/TestShaderSourceLoading.java +++ b/src/test/java/com/jozufozu/flywheel/backend/glsl/TestShaderSourceLoading.java @@ -1,4 +1,4 @@ -package com.jozufozu.flywheel.glsl; +package com.jozufozu.flywheel.backend.glsl; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; @@ -6,7 +6,7 @@ import static org.junit.jupiter.api.Assertions.assertInstanceOf; import org.junit.jupiter.api.Test; import com.google.common.collect.ImmutableList; -import com.jozufozu.flywheel.glsl.parse.Import; +import com.jozufozu.flywheel.backend.glsl.parse.Import; public class TestShaderSourceLoading extends TestBase { @Test