java imports cleanup
This commit is contained in:
@@ -7,7 +7,6 @@ import me.cortex.voxy.common.Logger;
|
|||||||
import me.cortex.voxy.commonImpl.VoxyCommon;
|
import me.cortex.voxy.commonImpl.VoxyCommon;
|
||||||
import net.fabricmc.api.ClientModInitializer;
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
|
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
|
||||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ import net.minecraft.util.WorldSavePath;
|
|||||||
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.security.MessageDigest;
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
|
||||||
|
|
||||||
public class VoxyClientInstance extends VoxyInstance {
|
public class VoxyClientInstance extends VoxyInstance {
|
||||||
public static boolean isInGame = false;
|
public static boolean isInGame = false;
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import me.cortex.voxy.client.core.rendering.section.AbstractSectionRenderer;
|
|||||||
import me.cortex.voxy.client.core.rendering.util.DownloadStream;
|
import me.cortex.voxy.client.core.rendering.util.DownloadStream;
|
||||||
import me.cortex.voxy.common.util.TrackedObject;
|
import me.cortex.voxy.common.util.TrackedObject;
|
||||||
import org.joml.Matrix4f;
|
import org.joml.Matrix4f;
|
||||||
import org.joml.Matrix4fc;
|
|
||||||
import org.lwjgl.opengl.GL30;
|
import org.lwjgl.opengl.GL30;
|
||||||
import org.lwjgl.system.MemoryUtil;
|
import org.lwjgl.system.MemoryUtil;
|
||||||
|
|
||||||
|
|||||||
@@ -12,24 +12,18 @@ import me.cortex.voxy.client.core.rendering.hierachical.NodeCleaner;
|
|||||||
import me.cortex.voxy.client.core.rendering.post.FullscreenBlit;
|
import me.cortex.voxy.client.core.rendering.post.FullscreenBlit;
|
||||||
import me.cortex.voxy.client.core.rendering.util.DepthFramebuffer;
|
import me.cortex.voxy.client.core.rendering.util.DepthFramebuffer;
|
||||||
import org.joml.Matrix4f;
|
import org.joml.Matrix4f;
|
||||||
import org.joml.Matrix4fc;
|
|
||||||
import org.lwjgl.opengl.GL30;
|
|
||||||
import org.lwjgl.system.MemoryStack;
|
import org.lwjgl.system.MemoryStack;
|
||||||
|
|
||||||
import java.util.function.BooleanSupplier;
|
import java.util.function.BooleanSupplier;
|
||||||
|
|
||||||
import static org.lwjgl.opengl.ARBComputeShader.glDispatchCompute;
|
import static org.lwjgl.opengl.ARBComputeShader.glDispatchCompute;
|
||||||
import static org.lwjgl.opengl.ARBShaderImageLoadStore.glBindImageTexture;
|
import static org.lwjgl.opengl.ARBShaderImageLoadStore.glBindImageTexture;
|
||||||
import static org.lwjgl.opengl.GL11.GL_COLOR_BUFFER_BIT;
|
|
||||||
import static org.lwjgl.opengl.GL11.GL_DEPTH_BUFFER_BIT;
|
|
||||||
import static org.lwjgl.opengl.GL11C.GL_NEAREST;
|
import static org.lwjgl.opengl.GL11C.GL_NEAREST;
|
||||||
import static org.lwjgl.opengl.GL11C.GL_RGBA8;
|
import static org.lwjgl.opengl.GL11C.GL_RGBA8;
|
||||||
import static org.lwjgl.opengl.GL15.GL_READ_WRITE;
|
import static org.lwjgl.opengl.GL15.GL_READ_WRITE;
|
||||||
import static org.lwjgl.opengl.GL20.glUniformMatrix4fv;
|
|
||||||
import static org.lwjgl.opengl.GL30C.*;
|
import static org.lwjgl.opengl.GL30C.*;
|
||||||
import static org.lwjgl.opengl.GL30C.GL_FRAMEBUFFER;
|
|
||||||
import static org.lwjgl.opengl.GL43.GL_DEPTH_STENCIL_TEXTURE_MODE;
|
import static org.lwjgl.opengl.GL43.GL_DEPTH_STENCIL_TEXTURE_MODE;
|
||||||
import static org.lwjgl.opengl.GL45C.*;
|
import static org.lwjgl.opengl.GL45C.glBindTextureUnit;
|
||||||
import static org.lwjgl.opengl.GL45C.glTextureParameterf;
|
import static org.lwjgl.opengl.GL45C.glTextureParameterf;
|
||||||
|
|
||||||
public class NormalRenderPipeline extends AbstractRenderPipeline {
|
public class NormalRenderPipeline extends AbstractRenderPipeline {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package me.cortex.voxy.client.core.gl;
|
|||||||
|
|
||||||
import me.cortex.voxy.common.util.TrackedObject;
|
import me.cortex.voxy.common.util.TrackedObject;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.system.MemoryStack;
|
|
||||||
import org.lwjgl.system.MemoryUtil;
|
import org.lwjgl.system.MemoryUtil;
|
||||||
|
|
||||||
import static org.lwjgl.opengl.GL11.GL_UNSIGNED_BYTE;
|
import static org.lwjgl.opengl.GL11.GL_UNSIGNED_BYTE;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ package me.cortex.voxy.client.core.model;
|
|||||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||||
import me.cortex.voxy.common.world.other.Mapper;
|
import me.cortex.voxy.common.world.other.Mapper;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
|
||||||
import net.minecraft.registry.RegistryKeys;
|
import net.minecraft.registry.RegistryKeys;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
@@ -12,11 +11,8 @@ import java.util.List;
|
|||||||
import java.util.concurrent.ConcurrentLinkedDeque;
|
import java.util.concurrent.ConcurrentLinkedDeque;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
import java.util.concurrent.locks.StampedLock;
|
|
||||||
|
|
||||||
import static org.lwjgl.opengl.ARBDirectStateAccess.glTextureParameterf;
|
|
||||||
import static org.lwjgl.opengl.GL11.glGetInteger;
|
import static org.lwjgl.opengl.GL11.glGetInteger;
|
||||||
import static org.lwjgl.opengl.GL12.GL_TEXTURE_MAX_LOD;
|
|
||||||
import static org.lwjgl.opengl.GL30.GL_FRAMEBUFFER;
|
import static org.lwjgl.opengl.GL30.GL_FRAMEBUFFER;
|
||||||
import static org.lwjgl.opengl.GL30.GL_FRAMEBUFFER_BINDING;
|
import static org.lwjgl.opengl.GL30.GL_FRAMEBUFFER_BINDING;
|
||||||
import static org.lwjgl.opengl.GL30C.glBindFramebuffer;
|
import static org.lwjgl.opengl.GL30C.glBindFramebuffer;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import net.minecraft.client.MinecraftClient;
|
|||||||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
import net.minecraft.client.texture.SpriteAtlasTexture;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
import static org.lwjgl.opengl.ARBDirectStateAccess.glTextureParameterf;
|
|
||||||
import static org.lwjgl.opengl.GL11.*;
|
import static org.lwjgl.opengl.GL11.*;
|
||||||
import static org.lwjgl.opengl.GL11C.GL_NEAREST;
|
import static org.lwjgl.opengl.GL11C.GL_NEAREST;
|
||||||
import static org.lwjgl.opengl.GL11C.GL_NEAREST_MIPMAP_LINEAR;
|
import static org.lwjgl.opengl.GL11C.GL_NEAREST_MIPMAP_LINEAR;
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ import me.cortex.voxy.client.core.gl.shader.ShaderType;
|
|||||||
import org.lwjgl.system.MemoryStack;
|
import org.lwjgl.system.MemoryStack;
|
||||||
import org.lwjgl.system.MemoryUtil;
|
import org.lwjgl.system.MemoryUtil;
|
||||||
|
|
||||||
import static org.lwjgl.opengl.ARBDirectStateAccess.*;
|
import static org.lwjgl.opengl.ARBDirectStateAccess.glTextureParameteri;
|
||||||
|
import static org.lwjgl.opengl.ARBDirectStateAccess.nglClearNamedFramebufferfv;
|
||||||
import static org.lwjgl.opengl.ARBShaderImageLoadStore.GL_FRAMEBUFFER_BARRIER_BIT;
|
import static org.lwjgl.opengl.ARBShaderImageLoadStore.GL_FRAMEBUFFER_BARRIER_BIT;
|
||||||
import static org.lwjgl.opengl.ARBShaderImageLoadStore.GL_PIXEL_BUFFER_BARRIER_BIT;
|
import static org.lwjgl.opengl.ARBShaderImageLoadStore.GL_PIXEL_BUFFER_BARRIER_BIT;
|
||||||
import static org.lwjgl.opengl.ARBShaderImageLoadStore.GL_SHADER_IMAGE_ACCESS_BARRIER_BIT;
|
import static org.lwjgl.opengl.ARBShaderImageLoadStore.GL_SHADER_IMAGE_ACCESS_BARRIER_BIT;
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ package me.cortex.voxy.client.core.rendering;
|
|||||||
import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap;
|
import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap;
|
||||||
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
|
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
|
||||||
import me.cortex.voxy.client.core.gl.GlBuffer;
|
import me.cortex.voxy.client.core.gl.GlBuffer;
|
||||||
import me.cortex.voxy.client.core.gl.GlFramebuffer;
|
|
||||||
import me.cortex.voxy.client.core.gl.GlTexture;
|
|
||||||
import me.cortex.voxy.client.core.gl.GlVertexArray;
|
import me.cortex.voxy.client.core.gl.GlVertexArray;
|
||||||
import me.cortex.voxy.client.core.gl.shader.AutoBindingShader;
|
import me.cortex.voxy.client.core.gl.shader.AutoBindingShader;
|
||||||
import me.cortex.voxy.client.core.gl.shader.Shader;
|
import me.cortex.voxy.client.core.gl.shader.Shader;
|
||||||
@@ -28,7 +26,6 @@ import static org.lwjgl.opengl.GL30.glBindVertexArray;
|
|||||||
import static org.lwjgl.opengl.GL30C.*;
|
import static org.lwjgl.opengl.GL30C.*;
|
||||||
import static org.lwjgl.opengl.GL31.glDrawElementsInstanced;
|
import static org.lwjgl.opengl.GL31.glDrawElementsInstanced;
|
||||||
import static org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseInstance;
|
import static org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseInstance;
|
||||||
import static org.lwjgl.opengl.GL45.glClearNamedFramebufferfv;
|
|
||||||
|
|
||||||
//This is a render subsystem, its very simple in what it does
|
//This is a render subsystem, its very simple in what it does
|
||||||
// it renders an AABB around loaded chunks, thats it
|
// it renders an AABB around loaded chunks, thats it
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import me.cortex.voxy.common.Logger;
|
|||||||
import me.cortex.voxy.common.util.AllocationArena;
|
import me.cortex.voxy.common.util.AllocationArena;
|
||||||
import me.cortex.voxy.common.util.MemoryBuffer;
|
import me.cortex.voxy.common.util.MemoryBuffer;
|
||||||
import me.cortex.voxy.common.util.UnsafeUtil;
|
import me.cortex.voxy.common.util.UnsafeUtil;
|
||||||
import me.cortex.voxy.common.world.WorldEngine;
|
|
||||||
import me.cortex.voxy.common.world.WorldSection;
|
import me.cortex.voxy.common.world.WorldSection;
|
||||||
import org.lwjgl.system.MemoryUtil;
|
import org.lwjgl.system.MemoryUtil;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import me.cortex.voxy.client.core.rendering.util.UploadStream;
|
|||||||
import me.cortex.voxy.common.Logger;
|
import me.cortex.voxy.common.Logger;
|
||||||
import me.cortex.voxy.common.util.MemoryBuffer;
|
import me.cortex.voxy.common.util.MemoryBuffer;
|
||||||
import me.cortex.voxy.common.world.WorldEngine;
|
import me.cortex.voxy.common.world.WorldEngine;
|
||||||
import org.lwjgl.system.MemoryStack;
|
|
||||||
import org.lwjgl.system.MemoryUtil;
|
import org.lwjgl.system.MemoryUtil;
|
||||||
|
|
||||||
import static me.cortex.voxy.client.core.rendering.util.PrintfDebugUtil.PRINTF_processor;
|
import static me.cortex.voxy.client.core.rendering.util.PrintfDebugUtil.PRINTF_processor;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package me.cortex.voxy.client.core.rendering.section;
|
package me.cortex.voxy.client.core.rendering.section;
|
||||||
|
|
||||||
|
|
||||||
import me.cortex.voxy.client.core.gl.GlTexture;
|
|
||||||
import me.cortex.voxy.client.core.model.ModelStore;
|
import me.cortex.voxy.client.core.model.ModelStore;
|
||||||
import me.cortex.voxy.client.core.rendering.Viewport;
|
import me.cortex.voxy.client.core.rendering.Viewport;
|
||||||
import me.cortex.voxy.client.core.rendering.section.geometry.IGeometryData;
|
import me.cortex.voxy.client.core.rendering.section.geometry.IGeometryData;
|
||||||
|
|||||||
@@ -2,13 +2,9 @@ package me.cortex.voxy.client.core.rendering.util;
|
|||||||
|
|
||||||
import me.cortex.voxy.client.core.gl.GlFramebuffer;
|
import me.cortex.voxy.client.core.gl.GlFramebuffer;
|
||||||
import me.cortex.voxy.client.core.gl.GlTexture;
|
import me.cortex.voxy.client.core.gl.GlTexture;
|
||||||
import org.lwjgl.opengl.GL11C;
|
|
||||||
import org.lwjgl.opengl.GL14C;
|
|
||||||
import org.lwjgl.system.MemoryStack;
|
import org.lwjgl.system.MemoryStack;
|
||||||
|
|
||||||
import static org.lwjgl.opengl.ARBDirectStateAccess.glClearNamedFramebufferfv;
|
|
||||||
import static org.lwjgl.opengl.ARBDirectStateAccess.nglClearNamedFramebufferfv;
|
import static org.lwjgl.opengl.ARBDirectStateAccess.nglClearNamedFramebufferfv;
|
||||||
import static org.lwjgl.opengl.GL11.GL_DEPTH_COMPONENT;
|
|
||||||
import static org.lwjgl.opengl.GL11C.GL_DEPTH;
|
import static org.lwjgl.opengl.GL11C.GL_DEPTH;
|
||||||
import static org.lwjgl.opengl.GL14.GL_DEPTH_COMPONENT24;
|
import static org.lwjgl.opengl.GL14.GL_DEPTH_COMPONENT24;
|
||||||
import static org.lwjgl.opengl.GL30C.*;
|
import static org.lwjgl.opengl.GL30C.*;
|
||||||
|
|||||||
Reference in New Issue
Block a user