Class Framebuffer

java.lang.Object
net.minecraft.client.shader.Framebuffer

public class Framebuffer extends Object
  • Field Details

    • width

      public int width
    • height

      public int height
    • viewWidth

      public int viewWidth
    • viewHeight

      public int viewHeight
    • useDepth

      public final boolean useDepth
    • frameBufferId

      public int frameBufferId
    • colorTextureId

      private int colorTextureId
    • depthBufferId

      private int depthBufferId
    • clearChannels

      public final float[] clearChannels
    • filterMode

      public int filterMode
    • stencilEnabled

      private boolean stencilEnabled
  • Constructor Details

    • Framebuffer

      public Framebuffer(int p_i51175_1_, int p_i51175_2_, boolean p_i51175_3_, boolean p_i51175_4_)
  • Method Details

    • resize

      public void resize(int p_216491_1_, int p_216491_2_, boolean p_216491_3_)
    • _resize

      private void _resize(int p_227586_1_, int p_227586_2_, boolean p_227586_3_)
    • destroyBuffers

      public void destroyBuffers()
    • copyDepthFrom

      public void copyDepthFrom(Framebuffer p_237506_1_)
    • createBuffers

      public void createBuffers(int p_216492_1_, int p_216492_2_, boolean p_216492_3_)
    • setFilterMode

      public void setFilterMode(int p_147607_1_)
    • checkStatus

      public void checkStatus()
    • bindRead

      public void bindRead()
    • unbindRead

      public void unbindRead()
    • bindWrite

      public void bindWrite(boolean p_147610_1_)
    • _bindWrite

      private void _bindWrite(boolean p_227585_1_)
    • unbindWrite

      public void unbindWrite()
    • setClearColor

      public void setClearColor(float p_147604_1_, float p_147604_2_, float p_147604_3_, float p_147604_4_)
    • blitToScreen

      public void blitToScreen(int p_147615_1_, int p_147615_2_)
    • blitToScreen

      public void blitToScreen(int p_178038_1_, int p_178038_2_, boolean p_178038_3_)
    • _blitToScreen

      private void _blitToScreen(int p_227588_1_, int p_227588_2_, boolean p_227588_3_)
    • clear

      public void clear(boolean p_216493_1_)
    • enableStencil

      public void enableStencil()
      Attempts to enable 8 bits of stencil buffer on this FrameBuffer. Modders must call this directly to set things up. This is to prevent the default cause where graphics cards do not support stencil bits. Make sure to call this on the main render thread!
    • isStencilEnabled

      public boolean isStencilEnabled()
      Returns wither or not this FBO has been successfully initialized with stencil bits. If not, and a modder wishes it to be, they must call enableStencil.
    • getColorTextureId

      public int getColorTextureId()
    • getDepthTextureId

      public int getDepthTextureId()