Class DynamicBufferManger
java.lang.Object
foundry.veil.impl.client.render.dynamicbuffer.DynamicBufferManger
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
free()
int
int
getActiveBuffers
(net.minecraft.resources.ResourceLocation name) int
getBufferTexture
(DynamicBufferType buffer) int[]
@Nullable AdvancedFbo
getDynamicFbo
(AdvancedFbo framebuffer) Creates a dynamic fbo from the specified framebuffer.boolean
void
resizeFramebuffers
(int width, int height) boolean
setActiveBuffers
(net.minecraft.resources.ResourceLocation name, int activeBuffers) void
setEnabled
(boolean enabled) void
setupRenderState
(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, wait
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
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
-
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 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 ornull
to 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
null
to 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)
-