Posted October 27, 20178 yr Hello everybody I wrote a render with a stencil: int bit = MinecraftForgeClient.reserveStencilBit(); int flag = 1 << bit; glDisable(GL_TEXTURE_2D); glEnable(GL_STENCIL_TEST); glStencilFunc(GL_ALWAYS, flag, flag); glStencilOp(GL_ZERO, GL_ZERO, GL_REPLACE); glStencilMask(flag); glColorMask(false, false, false, false); glDepthMask(false); glClearStencil(0); glClear(GL_STENCIL_BUFFER_BIT); // Render pattern by tesselator glEnable(GL_TEXTURE_2D); glStencilFunc(GL_EQUAL, flag, flag); glStencilMask(0); glColorMask(true, true, true, true); glDepthMask(true); // Render other primitives by tesselator glDisable(GL_STENCIL_TEST); MinecraftForgeClient.releaseStencilBit(bit); In the ClientProxy, in preInit I enabled the stencil: if (!Minecraft.getMinecraft().getFramebuffer().isStencilEnabled()) Minecraft.getMinecraft().getFramebuffer().enableStencil(); if I run the game in the development environment, then everything works fine. But if I build a mod to a jar file and install it on a clean minecraft with forge, then everything is rendered as if this stencil is not present (Nothing is cut off for a template). There are no errors in the logs. Does anyone know why the stencil does not work after build? UPD: Oops, I'm in the wrong section created a topic Edited October 27, 20178 yr by Minebot1708
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.