Class RenderTargetWrapper

java.lang.Object
dev.cammiescorner.velvet.impl.RenderTargetWrapper
All Implemented Interfaces:
ManagedRenderTarget

public final class RenderTargetWrapper extends Object implements ManagedRenderTarget
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    beginWrite(boolean updateViewport)
    Begins a write operation on this render target.
    void
    Clears the content of this render target.
    void
    clear(boolean swallowErrors)
     
    void
    copyDepthFrom(com.mojang.blaze3d.pipeline.RenderTarget target)
    Copies the depth texture from another render target to this render target.
    void
    Draws this render target, scaling to the default render target's width and height.
    void
    draw(boolean disableBlend)
    Draws this render target, scaling to the default render target's width and height.
    void
    draw(int width, int height, boolean disableBlend)
     
     
    @Nullable com.mojang.blaze3d.pipeline.RenderTarget
     
    net.minecraft.client.renderer.RenderType
    getRenderType(net.minecraft.client.renderer.RenderType base)
    Gets a simple RenderType that is functionally identical to base, but with a different RenderStateShard.OutputStateShard that binds this render target.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getName

      public String getName()
    • getRenderTarget

      @Nullable public @Nullable com.mojang.blaze3d.pipeline.RenderTarget getRenderTarget()
      Specified by:
      getRenderTarget in interface ManagedRenderTarget
    • copyDepthFrom

      public void copyDepthFrom(com.mojang.blaze3d.pipeline.RenderTarget target)
      Description copied from interface: ManagedRenderTarget
      Copies the depth texture from another render target to this render target.
      Specified by:
      copyDepthFrom in interface ManagedRenderTarget
      Parameters:
      target - the render target to copy depth from
    • beginWrite

      public void beginWrite(boolean updateViewport)
      Description copied from interface: ManagedRenderTarget
      Begins a write operation on this render target.

      If the operation is successful, every subsequent draw call will write to this render target.

      Specified by:
      beginWrite in interface ManagedRenderTarget
      Parameters:
      updateViewport - whether binding this render target should call RenderSystem.viewport(int, int, int, int)
    • draw

      public void draw()
      Description copied from interface: ManagedRenderTarget
      Draws this render target, scaling to the default render target's width and height. Disables blending by default.
      Specified by:
      draw in interface ManagedRenderTarget
    • draw

      public void draw(boolean disableBlend)
      Description copied from interface: ManagedRenderTarget
      Draws this render target, scaling to the default render target's width and height.
      Specified by:
      draw in interface ManagedRenderTarget
    • draw

      public void draw(int width, int height, boolean disableBlend)
      Specified by:
      draw in interface ManagedRenderTarget
    • clear

      public void clear()
      Description copied from interface: ManagedRenderTarget
      Clears the content of this render target.
      Specified by:
      clear in interface ManagedRenderTarget
    • clear

      public void clear(boolean swallowErrors)
      Specified by:
      clear in interface ManagedRenderTarget
    • getRenderType

      public net.minecraft.client.renderer.RenderType getRenderType(net.minecraft.client.renderer.RenderType base)
      Description copied from interface: ManagedRenderTarget
      Gets a simple RenderType that is functionally identical to base, but with a different RenderStateShard.OutputStateShard that binds this render target.
      Specified by:
      getRenderType in interface ManagedRenderTarget
      Parameters:
      base - the layer to copy
      Returns:
      a render layer using this render target
      See Also: