Package net.minecraft.client.gl
Class Framebuffer
java.lang.Object
net.minecraft.client.gl.Framebuffer
@Environment(CLIENT) public class Framebuffer extends Object
-
Field Summary
Fields Modifier and Type Field Description float[]clearColorprivate intcolorAttachmentprivate intdepthAttachmentintfbointtexFilterinttextureHeightinttextureWidthbooleanuseDepthAttachmentintviewportHeightintviewportWidth -
Constructor Summary
Constructors Constructor Description Framebuffer(int width, int height, boolean useDepth, boolean getError) -
Method Summary
Modifier and Type Method Description voidbeginRead()voidbeginWrite(boolean setViewport)private voidbind(boolean updateViewport)voidcheckFramebufferStatus()voidclear(boolean getError)voidcopyDepthFrom(Framebuffer framebuffer)voiddelete()voiddraw(int width, int height)voiddraw(int width, int height, boolean bool)private voiddrawInternal(int width, int height, boolean bool)voidendRead()voidendWrite()intgetColorAttachment()intgetDepthAttachment()voidinitFbo(int width, int height, boolean getError)voidresize(int width, int height, boolean getError)private voidresizeInternal(int width, int height, boolean getError)voidsetClearColor(float r, float g, float b, float a)voidsetTexFilter(int int2)
-
Field Details
-
textureWidth
public int textureWidth -
textureHeight
public int textureHeight -
viewportWidth
public int viewportWidth -
viewportHeight
public int viewportHeight -
useDepthAttachment
public final boolean useDepthAttachment -
fbo
public int fbo -
colorAttachment
private int colorAttachment -
depthAttachment
private int depthAttachment -
clearColor
public final float[] clearColor -
texFilter
public int texFilter
-
-
Constructor Details
-
Framebuffer
public Framebuffer(int width, int height, boolean useDepth, boolean getError)
-
-
Method Details
-
resize
public void resize(int width, int height, boolean getError) -
resizeInternal
private void resizeInternal(int width, int height, boolean getError) -
delete
public void delete() -
copyDepthFrom
-
initFbo
public void initFbo(int width, int height, boolean getError) -
setTexFilter
public void setTexFilter(int int2) -
checkFramebufferStatus
public void checkFramebufferStatus() -
beginRead
public void beginRead() -
endRead
public void endRead() -
beginWrite
public void beginWrite(boolean setViewport) -
bind
private void bind(boolean updateViewport) -
endWrite
public void endWrite() -
setClearColor
public void setClearColor(float r, float g, float b, float a) -
draw
public void draw(int width, int height) -
draw
public void draw(int width, int height, boolean bool) -
drawInternal
private void drawInternal(int width, int height, boolean bool) -
clear
public void clear(boolean getError) -
getColorAttachment
public int getColorAttachment() -
getDepthAttachment
public int getDepthAttachment()
-