Class LegacyAdvancedFboImpl
java.lang.Object
foundry.veil.impl.client.render.framebuffer.AdvancedFboImpl
foundry.veil.impl.client.render.framebuffer.LegacyAdvancedFboImpl
- All Implemented Interfaces:
AdvancedFbo
,AutoCloseable
,org.lwjgl.system.NativeResource
Legacy implementation of
AdvancedFbo
.-
Nested Class Summary
Nested classes/interfaces inherited from class foundry.veil.impl.client.render.framebuffer.AdvancedFboImpl
AdvancedFboImpl.Wrapper
Nested classes/interfaces inherited from interface foundry.veil.api.client.render.framebuffer.AdvancedFbo
AdvancedFbo.Builder
-
Field Summary
Fields inherited from class foundry.veil.impl.client.render.framebuffer.AdvancedFboImpl
clearMask, colorAttachments, currentDrawBuffers, depthAttachment, drawBuffers, ERRORS, height, id, MAIN_WRAPPER, width, wrapper
-
Constructor Summary
ConstructorDescriptionLegacyAdvancedFboImpl
(int width, int height, AdvancedFboAttachment[] colorAttachments, @Nullable AdvancedFboAttachment depthAttachment) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear
(float red, float green, float blue, float alpha, int clearMask, int[] buffers) Clears the specified buffers.void
create()
Creates the framebuffer and all attachments.void
drawBuffers
(int... buffers) Sets the buffers to draw to.void
Resets the draw buffers to enable all buffers.void
resolveToAdvancedFbo
(AdvancedFbo target, int mask, int filtering) Resolves this framebuffer to the provided advanced framebuffer as the target.void
resolveToFbo
(int id, int width, int height, int mask, int filtering) Resolves this framebuffer to the framebuffer with the specified id as the target.void
resolveToRenderTarget
(com.mojang.blaze3d.pipeline.RenderTarget target, int mask, int filtering) Resolves this framebuffer to the provided minecraft framebuffer as the target.void
setColorAttachmentTexture
(int attachment, int textureId, int layer) Updates the texture attachment reference for the specified slot.void
setDepthAttachmentTexture
(int textureId, int layer) Updates the depth texture attachment reference for the specified slot.Methods inherited from class foundry.veil.impl.client.render.framebuffer.AdvancedFboImpl
bind, bindDraw, copy, free, getClearMask, getColorAttachment, getColorAttachments, getDepthAttachment, getDrawBuffers, getHeight, getId, getWidth, hasColorAttachment, hasDepthAttachment, toRenderTarget
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface foundry.veil.api.client.render.framebuffer.AdvancedFbo
bindRead, clear, clear, clear, getColorRenderAttachment, getColorTextureAttachment, getDepthRenderAttachment, getDepthTextureAttachment, isColorRenderAttachment, isColorTextureAttachment, isDepthMutableTextureAttachment, isDepthRenderAttachment, isDepthTextureAttachment, isMutableColorTextureAttachment, resolveToAdvancedFbo, resolveToRenderTarget, resolveToScreen, resolveToScreen, setColorAttachmentTexture, setDepthAttachmentTexture
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
Constructor Details
-
LegacyAdvancedFboImpl
public LegacyAdvancedFboImpl(int width, int height, AdvancedFboAttachment[] colorAttachments, @Nullable @Nullable AdvancedFboAttachment depthAttachment)
-
-
Method Details
-
create
public void create()Description copied from interface:AdvancedFbo
Creates the framebuffer and all attachments. -
clear
public void clear(float red, float green, float blue, float alpha, int clearMask, int[] buffers) Description copied from interface:AdvancedFbo
Clears the specified buffers.- Parameters:
clearMask
- The buffers to clear
-
resetDrawBuffers
public void resetDrawBuffers()Description copied from interface:AdvancedFbo
Resets the draw buffers to enable all buffers. -
drawBuffers
public void drawBuffers(int... buffers) Description copied from interface:AdvancedFbo
Sets the buffers to draw to.- Parameters:
buffers
- The texture units of the color buffers to enable
-
resolveToFbo
public void resolveToFbo(int id, int width, int height, int mask, int filtering) Description copied from interface:AdvancedFbo
Resolves this framebuffer to the framebuffer with the specified id as the target.- Parameters:
id
- The id of the framebuffer to copy intowidth
- The width of the framebuffer being copied intoheight
- The height of the framebuffer being copied intomask
- The buffers to copy into the provided framebufferfiltering
- The filter to use if this framebuffer and the provided framebuffer are different sizes
-
resolveToAdvancedFbo
Description copied from interface:AdvancedFbo
Resolves this framebuffer to the provided advanced framebuffer as the target.- Parameters:
target
- The target framebuffer to copy data intomask
- The buffers to copy into the provided framebufferfiltering
- The filter to use if this framebuffer and the provided framebuffer are different sizes
-
resolveToRenderTarget
public void resolveToRenderTarget(com.mojang.blaze3d.pipeline.RenderTarget target, int mask, int filtering) Description copied from interface:AdvancedFbo
Resolves this framebuffer to the provided minecraft framebuffer as the target.- Parameters:
target
- The target framebuffer to copy data intomask
- The buffers to copy into the provided framebufferfiltering
- The filter to use if this framebuffer and the provided framebuffer are different sizes
-
setColorAttachmentTexture
public void setColorAttachmentTexture(int attachment, int textureId, int layer) Description copied from interface:AdvancedFbo
Updates the texture attachment reference for the specified slot. if the attachment is not known to be an
AdvancedFboMutableTextureAttachment
, useAdvancedFbo.isMutableColorTextureAttachment(int)
before calling this.- Parameters:
attachment
- The attachment to modifytextureId
- The id of the texture to draw intolayer
- The texture layer to attach. For cubemaps this is the attachment face
-
setDepthAttachmentTexture
public void setDepthAttachmentTexture(int textureId, int layer) Description copied from interface:AdvancedFbo
Updates the depth texture attachment reference for the specified slot. If the attachment is not known to be an
AdvancedFboMutableTextureAttachment
, useAdvancedFbo.isMutableColorTextureAttachment(int)
before calling this.- Parameters:
textureId
- The id of the texture to draw intolayer
- The texture layer to attach. For cubemaps this is the attachment face
-