Class VanillaAdvancedFboWrapper
java.lang.Object
foundry.veil.impl.client.render.wrapper.VanillaAdvancedFboWrapper
- All Implemented Interfaces:
AdvancedFbo,AutoCloseable,org.lwjgl.system.NativeResource
Wraps any render target with an
AdvancedFbo.-
Nested Class Summary
Nested classes/interfaces inherited from interface foundry.veil.api.client.render.framebuffer.AdvancedFbo
AdvancedFbo.Builder -
Constructor Summary
ConstructorsConstructorDescriptionVanillaAdvancedFboWrapper(Supplier<com.mojang.blaze3d.pipeline.RenderTarget> renderTargetSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(boolean setViewport) Binds this framebuffer for read and draw requests.voidbindDraw(boolean setViewport) Binds this framebuffer for draw requests.voidbindRead()Binds this framebuffer for read requests.voidclear()Clears the buffers in this framebuffer.voidcreate()Creates the framebuffer and all attachments.voidfree()intgetColorAttachment(int attachment) Checks the attachments for the specified slot.intint[]intintgetId()intgetWidth()booleanhasColorAttachment(int attachment) Checks to see if the provided attachment has been added to this framebuffer.booleancom.mojang.blaze3d.pipeline.RenderTargetMethods 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
draw, getColorRenderAttachment, getColorTextureAttachment, getDepthRenderAttachment, getDepthTextureAttachment, isColorRenderAttachment, isColorTextureAttachment, isDepthMutableTextureAttachment, isDepthRenderAttachment, isDepthTextureAttachment, isMutableColorTextureAttachment, resolveToAdvancedFbo, resolveToAdvancedFbo, resolveToFbo, resolveToFramebuffer, resolveToFramebuffer, resolveToScreen, resolveToScreen, setColorAttachmentTexture, setColorAttachmentTexture, setDepthAttachmentTexture, setDepthAttachmentTextureMethods inherited from interface org.lwjgl.system.NativeResource
close
-
Constructor Details
-
VanillaAdvancedFboWrapper
public VanillaAdvancedFboWrapper(Supplier<com.mojang.blaze3d.pipeline.RenderTarget> renderTargetSupplier)
-
-
Method Details
-
create
public void create()Description copied from interface:AdvancedFboCreates the framebuffer and all attachments.- Specified by:
createin interfaceAdvancedFbo
-
clear
public void clear()Description copied from interface:AdvancedFboClears the buffers in this framebuffer.- Specified by:
clearin interfaceAdvancedFbo
-
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
-
bindRead
public void bindRead()Description copied from interface:AdvancedFboBinds this framebuffer for read requests.- Specified by:
bindReadin interfaceAdvancedFbo
-
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
-
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 amount 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
-
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
-
toRenderTarget
public com.mojang.blaze3d.pipeline.RenderTarget toRenderTarget()- Specified by:
toRenderTargetin interfaceAdvancedFbo- Returns:
- A
RenderTargetthat uses this advanced fbo as the target
-
free
public void free()- Specified by:
freein interfaceorg.lwjgl.system.NativeResource
-