mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 04:42:17 +00:00
Cut redundant GLSM state tracking (#2189)
This commit is contained in:
1 parent
80e5b544c0
commit
12fa08ab46
11 files changed
+281
-82
No files matched your search
@@ -176,11 +176,6 @@ public class AngelicaConfig {
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean shaderParityFlip;
|
||||
|
||||
@Config.Comment("Skip the end-of-frame glFlush before the buffer swap [Experimental]")
|
||||
@Config.DefaultBoolean(false)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean skipEndOfFrameFlush;
|
||||
|
||||
@Config.Comment("Cache the vanilla skull mesh per skull type/player skin and batch skull draws")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.RequiresMcRestart
|
||||
|
||||
@@ -206,9 +206,8 @@ public enum Mixins implements IMixins {
|
||||
)
|
||||
),
|
||||
|
||||
ANGELICA_SKIP_END_FRAME_FLUSH(new MixinBuilder("Skip the end-of-frame glFlush before the buffer swap")
|
||||
ANGELICA_SKIP_END_FRAME_FLUSH(new MixinBuilder("Skip vanilla's end-of-frame glFlush; the buffer swap flushes")
|
||||
.setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> AngelicaConfig.skipEndOfFrameFlush)
|
||||
.addClientMixins(
|
||||
"angelica.MixinMinecraft_SkipEndFrameFlush"
|
||||
)
|
||||
|
||||
@@ -4,6 +4,7 @@ import lombok.Getter;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
|
||||
import net.coderbot.iris.Iris;
|
||||
import net.coderbot.iris.gbuffer_overrides.matching.SpecialCondition;
|
||||
import com.gtnewhorizons.angelica.glsm.DisplayListManager;
|
||||
import com.gtnewhorizons.angelica.glsm.GLStateManager;
|
||||
import com.gtnewhorizons.angelica.glsm.ffp.FfpExtendedAttribs;
|
||||
import com.gtnewhorizons.angelica.iris.IrisDisplayListState;
|
||||
@@ -150,6 +151,10 @@ public class GbufferPrograms {
|
||||
GLStateManager.enableAlphaTest();
|
||||
GLStateManager.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
|
||||
if (DisplayListManager.getRecordMode() == DisplayListManager.RecordMode.NONE) {
|
||||
GLStateManager.getTextures().getTextureUnitStates(1).enable();
|
||||
return;
|
||||
}
|
||||
final int previousUnit = GLStateManager.getActiveTextureUnitForServerState();
|
||||
GLStateManager.glActiveTexture(GL13.GL_TEXTURE1);
|
||||
GLStateManager.enableTexture();
|
||||
|
||||
Reference in new issue
Block a user