mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 04:42:17 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8898a6f252 | ||
|
|
37f638ac34 | ||
|
|
f73c698a5a |
No files matched your search
@@ -847,7 +847,9 @@ public class GLStateManager {
|
||||
|
||||
public static void glDrawArrays(int mode, int first, int count) {
|
||||
// Iris -- TODO: This doesn't seem to work and is related to matchPass()
|
||||
Iris.getPipelineManager().getPipeline().ifPresent(WorldRenderingPipeline::syncProgram);
|
||||
if(AngelicaConfig.enableIris) {
|
||||
Iris.getPipelineManager().getPipeline().ifPresent(WorldRenderingPipeline::syncProgram);
|
||||
}
|
||||
GL11.glDrawArrays(mode, first, count);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class MixinRenderingRegistry implements IRenderingRegistryExt {
|
||||
throw new RuntimeException(e.getCause());
|
||||
}
|
||||
});
|
||||
} else if (mainThreadHandler.getClass().isInstance(ThreadSafeISBRHFactory.class)) {
|
||||
} else if (ThreadSafeISBRHFactory.class.isAssignableFrom(mainThreadHandler.getClass())) {
|
||||
return THREAD_LOCAL_MAP.get().computeIfAbsent(mainThreadHandler.getClass(), k -> ((ThreadSafeISBRHFactory) mainThreadHandler).newInstance());
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
package me.jellysquid.mods.sodium.client.gui.options.named;
|
||||
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public enum LightingQuality implements NamedState {
|
||||
OFF("options.ao.off"),
|
||||
LOW("options.ao.min"),
|
||||
@@ -26,6 +28,6 @@ public enum LightingQuality implements NamedState {
|
||||
}
|
||||
|
||||
public static LightingQuality fromOrdinal(int ordinal) {
|
||||
return VALUES[ordinal];
|
||||
return VALUES[MathHelper.clamp_int(ordinal, 0, VALUES.length - 1)];
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package me.jellysquid.mods.sodium.client.gui.options.named;
|
||||
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public enum ParticleMode implements NamedState {
|
||||
ALL("options.particles.all"),
|
||||
DECREASED("options.particles.decreased"),
|
||||
@@ -19,6 +21,6 @@ public enum ParticleMode implements NamedState {
|
||||
}
|
||||
|
||||
public static ParticleMode fromOrdinal(int ordinal) {
|
||||
return VALUES[ordinal];
|
||||
return VALUES[MathHelper.clamp_int(ordinal, 0, VALUES.length - 1)];
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.gtnewhorizons.angelica.compat.mojang.Camera;
|
||||
import com.gtnewhorizons.angelica.compat.mojang.ChunkPos;
|
||||
import com.gtnewhorizons.angelica.compat.toremove.MatrixStack;
|
||||
import com.gtnewhorizons.angelica.config.AngelicaConfig;
|
||||
import com.gtnewhorizons.angelica.rendering.AngelicaRenderQueue;
|
||||
import it.unimi.dsi.fastutil.ints.IntIterator;
|
||||
import it.unimi.dsi.fastutil.ints.IntList;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||
@@ -45,6 +46,7 @@ import java.util.ArrayDeque;
|
||||
import java.util.Collection;
|
||||
import java.util.Deque;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
public class ChunkRenderManager<T extends ChunkGraphicsState> implements ChunkStatusListener {
|
||||
/**
|
||||
@@ -639,9 +641,7 @@ public class ChunkRenderManager<T extends ChunkGraphicsState> implements ChunkSt
|
||||
}
|
||||
|
||||
private void scheduleRebuildOffThread(int x, int y, int z, boolean important) {
|
||||
// TODO: Sodium Threads
|
||||
throw new RuntimeException("scheduleRebuildOffThread");
|
||||
// Minecraft.getMinecraft().submit(() -> this.scheduleRebuild(x, y, z, important));
|
||||
AngelicaRenderQueue.executor().execute(() -> this.scheduleRebuild(x, y, z, important));
|
||||
}
|
||||
|
||||
public void scheduleRebuild(int x, int y, int z, boolean important) {
|
||||
|
||||
Reference in new issue
Block a user