Package net.minecraft.client.shader
Class Framebuffer
- java.lang.Object
-
- net.minecraft.client.shader.Framebuffer
-
public class Framebuffer extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description float[]
clearChannels
private int
colorTextureId
private int
depthBufferId
int
filterMode
int
frameBufferId
int
height
private boolean
stencilEnabled
boolean
useDepth
int
viewHeight
int
viewWidth
int
width
-
Constructor Summary
Constructors Constructor Description Framebuffer(int p_i51175_1_, int p_i51175_2_, boolean p_i51175_3_, boolean p_i51175_4_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_bindWrite(boolean p_227585_1_)
private void
_blitToScreen(int p_227588_1_, int p_227588_2_, boolean p_227588_3_)
private void
_resize(int p_227586_1_, int p_227586_2_, boolean p_227586_3_)
void
bindRead()
void
bindWrite(boolean p_147610_1_)
void
blitToScreen(int p_147615_1_, int p_147615_2_)
void
blitToScreen(int p_178038_1_, int p_178038_2_, boolean p_178038_3_)
void
checkStatus()
void
clear(boolean p_216493_1_)
void
copyDepthFrom(Framebuffer p_237506_1_)
void
createBuffers(int p_216492_1_, int p_216492_2_, boolean p_216492_3_)
void
destroyBuffers()
void
enableStencil()
Attempts to enable 8 bits of stencil buffer on this FrameBuffer.int
getColorTextureId()
int
getDepthTextureId()
boolean
isStencilEnabled()
Returns wither or not this FBO has been successfully initialized with stencil bits.void
resize(int p_216491_1_, int p_216491_2_, boolean p_216491_3_)
void
setClearColor(float p_147604_1_, float p_147604_2_, float p_147604_3_, float p_147604_4_)
void
setFilterMode(int p_147607_1_)
void
unbindRead()
void
unbindWrite()
-
-
-
Field Detail
-
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
-
-
Method Detail
-
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()
-
-