Package com.mojang.blaze3d.pipeline
Class RenderTarget
java.lang.Object
com.mojang.blaze3d.pipeline.RenderTarget
- Direct Known Subclasses:
MainTarget,TextureTarget
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate final float[]protected intprotected intintintprivate static final intintprivate static final intprivate booleanfinal booleanintintint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void_bindWrite(boolean setViewport) private void_blitToScreen(int width, int height, boolean disableBlend) private void_resize(int width, int height, boolean clearError) voidbindRead()voidbindWrite(boolean setViewport) voidblitToScreen(int width, int height) voidblitToScreen(int width, int height, boolean disableBlend) voidvoidclear(boolean clearError) voidcopyDepthFrom(RenderTarget otherTarget) voidcreateBuffers(int width, int height, boolean clearError) voidvoidAttempts to enable 8 bits of stencil buffer on this FrameBuffer.intintbooleanReturns whether this FBO has been successfully initialized with stencil bits.voidresize(int width, int height, boolean clearError) voidsetClearColor(float red, float green, float blue, float alpha) voidsetFilterMode(int filterMode) private voidsetFilterMode(int filterMode, boolean force) voidvoid
-
Field Details
-
RED_CHANNEL
private static final int RED_CHANNEL- See Also:
-
GREEN_CHANNEL
private static final int GREEN_CHANNEL- See Also:
-
BLUE_CHANNEL
private static final int BLUE_CHANNEL- See Also:
-
ALPHA_CHANNEL
private static final int ALPHA_CHANNEL- See Also:
-
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
protected int colorTextureId -
depthBufferId
protected int depthBufferId -
clearChannels
private final float[] clearChannels -
filterMode
public int filterMode -
stencilEnabled
private boolean stencilEnabled
-
-
Constructor Details
-
RenderTarget
public RenderTarget(boolean useDepth)
-
-
Method Details
-
resize
public void resize(int width, int height, boolean clearError) -
_resize
private void _resize(int width, int height, boolean clearError) -
destroyBuffers
public void destroyBuffers() -
copyDepthFrom
-
createBuffers
public void createBuffers(int width, int height, boolean clearError) -
setFilterMode
public void setFilterMode(int filterMode) -
setFilterMode
private void setFilterMode(int filterMode, boolean force) -
checkStatus
public void checkStatus() -
bindRead
public void bindRead() -
unbindRead
public void unbindRead() -
bindWrite
public void bindWrite(boolean setViewport) -
_bindWrite
private void _bindWrite(boolean setViewport) -
unbindWrite
public void unbindWrite() -
setClearColor
public void setClearColor(float red, float green, float blue, float alpha) -
blitToScreen
public void blitToScreen(int width, int height) -
blitToScreen
public void blitToScreen(int width, int height, boolean disableBlend) -
_blitToScreen
private void _blitToScreen(int width, int height, boolean disableBlend) -
clear
public void clear(boolean clearError) -
getColorTextureId
public int getColorTextureId() -
getDepthTextureId
public int getDepthTextureId() -
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 whether this FBO has been successfully initialized with stencil bits. If not, and a modder wishes it to be, they must call enableStencil.
-