Class DynamicBufferManger
java.lang.Object
foundry.veil.impl.client.render.dynamicbuffer.DynamicBufferManger
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
-
Field Summary
Modifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
clearRenderState
(boolean setViewport) Clears the current render state by binding the main framebuffer.void
free()
int
int
getActiveBuffers
(net.minecraft.resources.ResourceLocation name) int
getBufferTexture
(DynamicBufferType buffer) @Nullable AdvancedFbo
getDynamicFbo
(AdvancedFbo framebuffer, boolean createTextures) 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) boolean
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 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 framebufferrenderTarget
- The render target to wrap ornull
to freesetViewport
- 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 tocreateTextures
- 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)
-