Posted October 10, 201213 yr Hi there! I'm quite new to MC modding and not familiar with all of Forge's features. I'm experimenting with some alternative GUI rendering at the moment for which my code requires an 8bit stencil buffer to be available within Minecraft's OpenGL rendering context. By default, Minecraft seems to initialize the context without stencil buffer, which leads me to my question: Is there any way for a Forge mod to signal that it requires a stencil buffer? or will i have to modify the startGame() method of the net.minecraft.client.Minecraft class as I'm doing right now? (changed the Display initialization to Display.create((new PixelFormat()).withDepthBits(24).withStencilBits(); ) As far as i understand it, this would require users of my mod to modify their minecraft.jar instead of just copying the mod file to the mods folder. It might also lead to incompatibilities with other modifications (i could imagine that OptiFine for example also replaces some OpenGL initialization code). Cheers, Umpani
October 13, 201213 yr Hello, From what I can tell, there is no way to request a stencil buffer without editing the Minecraft class. That shouldn't be to much a problem. I don't know of any popular mods that edit that class unless it's some noob who can't use reflections. Also, Optifine doesn't edit it. So, you have tow options. Edit the class or change your code so it doesn't require a stencil buffer. Either work would work.
October 13, 201213 yr Author Thanks for the input, i think i will modify the Minecraft class for now and implement the third option later on: render my stuff to a FBO with an attatched depth/stencil buffer before rendering it to the default frame buffer. I prefer to avoid fiddling with major MC classes unless its absolutely necessary. Thanks, Umpani
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.