Class DynamicBufferManger

java.lang.Object
foundry.veil.impl.client.render.dynamicbuffer.DynamicBufferManger
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource

public class DynamicBufferManger extends Object implements org.lwjgl.system.NativeResource
  • Field Details

    • MAIN_WRAPPER

      public static final net.minecraft.resources.ResourceLocation MAIN_WRAPPER
  • Constructor Details

    • DynamicBufferManger

      public DynamicBufferManger(int width, int height)
  • Method Details

    • getActiveBuffers

      public int getActiveBuffers(net.minecraft.resources.ResourceLocation name)
    • getActiveBuffers

      public int getActiveBuffers()
    • getBufferTexture

      public int getBufferTexture(DynamicBufferType buffer)
    • setActiveBuffers

      public boolean setActiveBuffers(net.minecraft.resources.ResourceLocation name, int activeBuffers)
    • isEnabled

      @Internal public boolean isEnabled()
    • setEnabled

      @Internal public void setEnabled(boolean enabled)
    • free

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

      @Internal public boolean setupRenderState(net.minecraft.resources.ResourceLocation name, @Nullable @Nullable com.mojang.blaze3d.pipeline.RenderTarget renderTarget, boolean setViewport)
      Sets up the rendering state for the specified target.
      Parameters:
      name - The name of the framebuffer
      renderTarget - The render target to wrap or null to free
      setViewport - Whether the viewport should also be set
      Returns:
      Whether the buffer was bound successfully
    • getDynamicFbo

      @Nullable public @Nullable AdvancedFbo getDynamicFbo(AdvancedFbo framebuffer, boolean createTextures)
      Creates a dynamic fbo from the specified framebuffer. It will only write into the first color texture buffer and optionally the depth texture.
      Parameters:
      framebuffer - The framebuffer to add dynamic buffers to
      createTextures - Whether to create new buffer textures or use the existing ones
      Returns:
      The created buffer or null to use the input value
    • clearRenderState

      @Internal public boolean clearRenderState(boolean setViewport)
      Clears the current render state by binding the main framebuffer.
      Parameters:
      setViewport - Whether the viewport should also be set
      Returns:
      Whether the buffer was bound successfully
    • clear

      @Internal public void clear()
    • resizeFramebuffers

      @Internal public void resizeFramebuffers(int width, int height)