fix test mod and add warning comment to framebuffer (#6698)
This commit is contained in:
parent
68cf703435
commit
8d3685439e
2 changed files with 5 additions and 3 deletions
|
@ -15,7 +15,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.func_147611_b();
|
this.func_147611_b();
|
||||||
@@ -254,4 +260,28 @@
|
@@ -254,4 +260,29 @@
|
||||||
GlStateManager.func_227658_a_(i, p_216493_1_);
|
GlStateManager.func_227658_a_(i, p_216493_1_);
|
||||||
this.func_147609_e();
|
this.func_147609_e();
|
||||||
}
|
}
|
||||||
|
@ -23,9 +23,10 @@
|
||||||
+ /*================================ FORGE START ================================================*/
|
+ /*================================ FORGE START ================================================*/
|
||||||
+ private boolean stencilEnabled = false;
|
+ private boolean stencilEnabled = false;
|
||||||
+ /**
|
+ /**
|
||||||
+ * Attempts to enabled 8 bits of stencil buffer on this FrameBuffer.
|
+ * Attempts to enable 8 bits of stencil buffer on this FrameBuffer.
|
||||||
+ * Modders must call this directly to set things up.
|
+ * Modders must call this directly to set things up.
|
||||||
+ * This is to prevent the default cause where graphics cards do not support stencil bits.
|
+ * This is to prevent the default cause where graphics cards do not support stencil bits.
|
||||||
|
+ * <b>Make sure to call this on the main render thread!</b>
|
||||||
+ */
|
+ */
|
||||||
+ public void enableStencil()
|
+ public void enableStencil()
|
||||||
+ {
|
+ {
|
||||||
|
|
|
@ -2,6 +2,7 @@ package net.minecraftforge.debug.client.rendering;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraftforge.eventbus.api.Event;
|
import net.minecraftforge.eventbus.api.Event;
|
||||||
|
import net.minecraftforge.fml.DeferredWorkQueue;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||||
|
@ -13,6 +14,6 @@ public class StencilEnableTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clientSetup(FMLClientSetupEvent event) {
|
private void clientSetup(FMLClientSetupEvent event) {
|
||||||
Minecraft.getInstance().getFramebuffer().enableStencil();
|
DeferredWorkQueue.runLater(() -> Minecraft.getInstance().getFramebuffer().enableStencil());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue