Class AdvancedFboImpl
java.lang.Object
foundry.veil.impl.client.render.framebuffer.AdvancedFboImpl
- All Implemented Interfaces:
AdvancedFbo,AutoCloseable,org.lwjgl.system.NativeResource
- Direct Known Subclasses:
DSAAdvancedFboImpl,LegacyAdvancedFboImpl
Default implementation of
AdvancedFbo.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA vanillaRenderTargetwrapper of theAdvancedFboImpl.Nested classes/interfaces inherited from interface foundry.veil.api.client.render.framebuffer.AdvancedFbo
AdvancedFbo.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final AdvancedFboAttachment[]protected int[]protected final Stringprotected final AdvancedFboAttachmentprotected final int[]protected final booleanprotected final intprotected intstatic final Supplier<AdvancedFbo> protected final intprotected final Supplier<AdvancedFboImpl.Wrapper> -
Constructor Summary
ConstructorsConstructorDescriptionAdvancedFboImpl(int width, int height, AdvancedFboAttachment[] colorAttachments, @Nullable AdvancedFboAttachment depthAttachment, @Nullable String debugLabel) -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(boolean setViewport) Binds this framebuffer for read and draw requests.voidbindDraw(boolean setViewport) Binds this framebuffer for draw requests.static AdvancedFbo.Buildercopy(com.mojang.blaze3d.pipeline.RenderTarget parent) voidfree()intgetColorAttachment(int attachment) Checks the attachments for the specified slot.int@Nullable Stringint[]intintgetId()intgetWidth()booleanhasColorAttachment(int attachment) Checks to see if the provided attachment has been added to this framebuffer.booleanbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface foundry.veil.api.client.render.framebuffer.AdvancedFbo
bindRead, clear, clear, clear, clear, clear, clear, clear, create, drawBuffers, getColorRenderAttachment, getColorTextureAttachment, getDepthRenderAttachment, getDepthTextureAttachment, isColorRenderAttachment, isColorTextureAttachment, isDepthMutableTextureAttachment, isDepthRenderAttachment, isDepthTextureAttachment, isMutableColorTextureAttachment, resetDrawBuffers, resolveToAdvancedFbo, resolveToAdvancedFbo, resolveToFbo, resolveToRenderTarget, resolveToRenderTarget, resolveToScreen, resolveToScreen, setColorAttachmentTexture, setColorAttachmentTexture, setDepthAttachmentTexture, setDepthAttachmentTextureMethods inherited from interface org.lwjgl.system.NativeResource
close
-
Field Details
-
ERRORS
-
MAIN_WRAPPER
-
id
protected int id -
width
protected final int width -
height
protected final int height -
colorAttachments
-
depthAttachment
-
hasStencil
protected final boolean hasStencil -
debugLabel
-
clearMask
protected final int clearMask -
drawBuffers
protected final int[] drawBuffers -
currentDrawBuffers
protected int[] currentDrawBuffers -
wrapper
-
-
Constructor Details
-
AdvancedFboImpl
public AdvancedFboImpl(int width, int height, AdvancedFboAttachment[] colorAttachments, @Nullable @Nullable AdvancedFboAttachment depthAttachment, @Nullable @Nullable String debugLabel)
-
-
Method Details
-
bind
public void bind(boolean setViewport) Description copied from interface:AdvancedFboBinds this framebuffer for read and draw requests.- Specified by:
bindin interfaceAdvancedFbo- Parameters:
setViewport- Whether to set the viewport to fit the bounds of this framebuffer
-
bindDraw
public void bindDraw(boolean setViewport) Description copied from interface:AdvancedFboBinds this framebuffer for draw requests.- Specified by:
bindDrawin interfaceAdvancedFbo- Parameters:
setViewport- Whether to set the viewport to fit the bounds of this framebuffer
-
free
public void free()- Specified by:
freein interfaceorg.lwjgl.system.NativeResource
-
getId
public int getId()- Specified by:
getIdin interfaceAdvancedFbo- Returns:
- The id of this framebuffer or -1 if it has been deleted
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceAdvancedFbo- Returns:
- The width of this framebuffer
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceAdvancedFbo- Returns:
- The height of this framebuffer
-
getColorAttachments
public int getColorAttachments()- Specified by:
getColorAttachmentsin interfaceAdvancedFbo- Returns:
- The number of color attachments in this framebuffer
-
getClearMask
public int getClearMask()- Specified by:
getClearMaskin interfaceAdvancedFbo- Returns:
- The mak used while clearing the buffer
-
getDrawBuffers
public int[] getDrawBuffers()- Specified by:
getDrawBuffersin interfaceAdvancedFbo- Returns:
- The names of the default draw buffer state
-
hasColorAttachment
public boolean hasColorAttachment(int attachment) Description copied from interface:AdvancedFboChecks to see if the provided attachment has been added to this framebuffer.- Specified by:
hasColorAttachmentin interfaceAdvancedFbo- Parameters:
attachment- The attachment to check- Returns:
- Whether there is a valid attachment in the specified slot
-
hasDepthAttachment
public boolean hasDepthAttachment()- Specified by:
hasDepthAttachmentin interfaceAdvancedFbo- Returns:
- Whether there is a depth attachment added to this framebuffer
-
hasStencilAttachment
public boolean hasStencilAttachment()- Specified by:
hasStencilAttachmentin interfaceAdvancedFbo- Returns:
- Whether a depth-stencil attachment is added to this framebuffer
-
getColorAttachment
Description copied from interface:AdvancedFboChecks the attachments for the specified slot. If the amount of attachments is unknown, useAdvancedFbo.hasColorAttachment(int)to verify before calling this.- Specified by:
getColorAttachmentin interfaceAdvancedFbo- Parameters:
attachment- The attachment to get- Returns:
- The attachment in the specified attachment slot
-
getDepthAttachment
- Specified by:
getDepthAttachmentin interfaceAdvancedFbo- Returns:
- The depth attachment of this framebuffer
-
getDebugLabel
- Specified by:
getDebugLabelin interfaceAdvancedFbo- Returns:
- The debug label of this framebuffer in a graphics debugger
-
toRenderTarget
- Specified by:
toRenderTargetin interfaceAdvancedFbo- Returns:
- A
RenderTargetthat uses this advanced fbo as the target
-
copy
-