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

@Internal public abstract class AdvancedFboImpl extends Object implements AdvancedFbo
Default implementation of AdvancedFbo.
  • Field Details Link icon

    • ERRORS Link icon

      protected static final Map<Integer,String> ERRORS
    • MAIN_WRAPPER Link icon

      public static final Supplier<AdvancedFbo> MAIN_WRAPPER
    • id Link icon

      protected int id
    • width Link icon

      protected final int width
    • height Link icon

      protected final int height
    • colorAttachments Link icon

      protected final AdvancedFboAttachment[] colorAttachments
    • depthAttachment Link icon

      protected final AdvancedFboAttachment depthAttachment
    • hasStencil Link icon

      protected final boolean hasStencil
    • debugLabel Link icon

      protected final String debugLabel
    • clearMask Link icon

      protected final int clearMask
    • drawBuffers Link icon

      protected final int[] drawBuffers
    • currentDrawBuffers Link icon

      protected int[] currentDrawBuffers
    • wrapper Link icon

      protected final Supplier<AdvancedFboImpl.Wrapper> wrapper
  • Constructor Details Link icon

  • Method Details Link icon

    • bind Link icon

      public void bind(boolean setViewport)
      Description copied from interface: AdvancedFbo
      Binds this framebuffer for read and draw requests.
      Specified by:
      bind in interface AdvancedFbo
      Parameters:
      setViewport - Whether to set the viewport to fit the bounds of this framebuffer
    • bindDraw Link icon

      public void bindDraw(boolean setViewport)
      Description copied from interface: AdvancedFbo
      Binds this framebuffer for draw requests.
      Specified by:
      bindDraw in interface AdvancedFbo
      Parameters:
      setViewport - Whether to set the viewport to fit the bounds of this framebuffer
    • free Link icon

      public void free()
      Specified by:
      free in interface org.lwjgl.system.NativeResource
    • getId Link icon

      public int getId()
      Specified by:
      getId in interface AdvancedFbo
      Returns:
      The id of this framebuffer or -1 if it has been deleted
    • getWidth Link icon

      public int getWidth()
      Specified by:
      getWidth in interface AdvancedFbo
      Returns:
      The width of this framebuffer
    • getHeight Link icon

      public int getHeight()
      Specified by:
      getHeight in interface AdvancedFbo
      Returns:
      The height of this framebuffer
    • getColorAttachments Link icon

      public int getColorAttachments()
      Specified by:
      getColorAttachments in interface AdvancedFbo
      Returns:
      The number of color attachments in this framebuffer
    • getClearMask Link icon

      public int getClearMask()
      Specified by:
      getClearMask in interface AdvancedFbo
      Returns:
      The mak used while clearing the buffer
    • getDrawBuffers Link icon

      public int[] getDrawBuffers()
      Specified by:
      getDrawBuffers in interface AdvancedFbo
      Returns:
      The names of the default draw buffer state
    • hasColorAttachment Link icon

      public boolean hasColorAttachment(int attachment)
      Description copied from interface: AdvancedFbo
      Checks to see if the provided attachment has been added to this framebuffer.
      Specified by:
      hasColorAttachment in interface AdvancedFbo
      Parameters:
      attachment - The attachment to check
      Returns:
      Whether there is a valid attachment in the specified slot
    • hasDepthAttachment Link icon

      public boolean hasDepthAttachment()
      Specified by:
      hasDepthAttachment in interface AdvancedFbo
      Returns:
      Whether there is a depth attachment added to this framebuffer
    • hasStencilAttachment Link icon

      public boolean hasStencilAttachment()
      Specified by:
      hasStencilAttachment in interface AdvancedFbo
      Returns:
      Whether a depth-stencil attachment is added to this framebuffer
    • getColorAttachment Link icon

      public AdvancedFboAttachment getColorAttachment(int attachment)
      Description copied from interface: AdvancedFbo
      Checks the attachments for the specified slot. If the amount of attachments is unknown, use AdvancedFbo.hasColorAttachment(int) to verify before calling this.
      Specified by:
      getColorAttachment in interface AdvancedFbo
      Parameters:
      attachment - The attachment to get
      Returns:
      The attachment in the specified attachment slot
    • getDepthAttachment Link icon

      public AdvancedFboAttachment getDepthAttachment()
      Specified by:
      getDepthAttachment in interface AdvancedFbo
      Returns:
      The depth attachment of this framebuffer
    • getDebugLabel Link icon

      @Nullable public @Nullable String getDebugLabel()
      Specified by:
      getDebugLabel in interface AdvancedFbo
      Returns:
      The debug label of this framebuffer in a graphics debugger
    • toRenderTarget Link icon

      public AdvancedFboImpl.Wrapper toRenderTarget()
      Specified by:
      toRenderTarget in interface AdvancedFbo
      Returns:
      A RenderTarget that uses this advanced fbo as the target
    • copy Link icon

      @Internal public static AdvancedFbo.Builder copy(com.mojang.blaze3d.pipeline.RenderTarget parent)