Class DynamicBufferManager
java.lang.Object
foundry.veil.impl.client.render.dynamicbuffer.DynamicBufferManager
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource
@Internal
public class DynamicBufferManager
extends Object
implements org.lwjgl.system.NativeResource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidfree()intintgetActiveBuffers(net.minecraft.resources.ResourceLocation name) intgetBufferTexture(DynamicBufferType buffer) int[]getDynamicFbo(AdvancedFbo framebuffer) Creates a dynamic fbo from the specified framebuffer.booleanvoidresizeFramebuffers(int width, int height) booleansetActiveBuffers(net.minecraft.resources.ResourceLocation name, int activeBuffers) voidsetEnabled(boolean enabled) voidsetupRenderState(net.minecraft.resources.ResourceLocation name, @Nullable com.mojang.blaze3d.pipeline.RenderTarget renderTarget, boolean setViewport) Sets up the rendering state for the specified target.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lwjgl.system.NativeResource
close
-
Field Details
-
MAIN_WRAPPER
public static final net.minecraft.resources.ResourceLocation MAIN_WRAPPER
-
-
Constructor Details
-
DynamicBufferManager
public DynamicBufferManager(int width, int height)
-
-
Method Details
-
getActiveBuffers
public int getActiveBuffers(net.minecraft.resources.ResourceLocation name) -
getActiveBuffers
public int getActiveBuffers() -
getBufferTexture
-
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:
freein interfaceorg.lwjgl.system.NativeResource
-
setupRenderState
@Internal public void 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 framebufferrenderTarget- The render target to wrap ornullto freesetViewport- Whether the viewport should also be set
-
getDynamicFbo
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- Returns:
- The created buffer or
nullto use the input value
-
getClearBuffers
public int[] getClearBuffers()- Returns:
- The color buffers used for dynamic buffers for clearing
-
clear
@Internal public void clear() -
resizeFramebuffers
@Internal public void resizeFramebuffers(int width, int height)
-