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 int
private static final int
private final float[]
protected int
protected int
int
int
private static final int
int
private static final int
private boolean
final boolean
int
int
int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
_bindWrite
(boolean pSetViewport) private void
_blitToScreen
(int pWidth, int pHeight, boolean pDisableBlend) private void
_resize
(int pWidth, int pHeight, boolean pClearError) void
bindRead()
void
bindWrite
(boolean pSetViewport) void
blitToScreen
(int pWidth, int pHeight) void
blitToScreen
(int pWidth, int pHeight, boolean pDisableBlend) void
void
clear
(boolean pClearError) void
copyDepthFrom
(RenderTarget pOtherTarget) void
createBuffers
(int pWidth, int pHeight, boolean pClearError) void
void
Attempts to enable 8 bits of stencil buffer on this FrameBuffer.int
int
boolean
Returns whether this FBO has been successfully initialized with stencil bits.void
resize
(int pWidth, int pHeight, boolean pClearError) void
setClearColor
(float pRed, float pGreen, float pBlue, float pAlpha) void
setFilterMode
(int pFilterMode) private void
setFilterMode
(int pFilterMode, boolean pForce) void
void
-
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 pUseDepth)
-
-
Method Details
-
resize
public void resize(int pWidth, int pHeight, boolean pClearError) -
_resize
private void _resize(int pWidth, int pHeight, boolean pClearError) -
destroyBuffers
public void destroyBuffers() -
copyDepthFrom
-
createBuffers
public void createBuffers(int pWidth, int pHeight, boolean pClearError) -
setFilterMode
public void setFilterMode(int pFilterMode) -
setFilterMode
private void setFilterMode(int pFilterMode, boolean pForce) -
checkStatus
public void checkStatus() -
bindRead
public void bindRead() -
unbindRead
public void unbindRead() -
bindWrite
public void bindWrite(boolean pSetViewport) -
_bindWrite
private void _bindWrite(boolean pSetViewport) -
unbindWrite
public void unbindWrite() -
setClearColor
public void setClearColor(float pRed, float pGreen, float pBlue, float pAlpha) -
blitToScreen
public void blitToScreen(int pWidth, int pHeight) -
blitToScreen
public void blitToScreen(int pWidth, int pHeight, boolean pDisableBlend) -
_blitToScreen
private void _blitToScreen(int pWidth, int pHeight, boolean pDisableBlend) -
clear
public void clear(boolean pClearError) -
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.
-