Package foundry.veil.render.framebuffer
Class FramebufferManager
java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,T>>
foundry.veil.resource.CodecReloadListener<FramebufferDefinition>
foundry.veil.render.framebuffer.FramebufferManager
- All Implemented Interfaces:
AutoCloseable,net.minecraft.server.packs.resources.PreparableReloadListener,org.lwjgl.system.NativeResource
public class FramebufferManager
extends CodecReloadListener<FramebufferDefinition>
implements org.lwjgl.system.NativeResource
Manages all framebuffers and custom definitions specified in files.
All framebuffers except for the main one can be customized from the
modid:pinwheel/framebuffers folder in the assets.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.resources.ResourceLocation>Fields inherited from class foundry.veil.resource.CodecReloadListener
codec, converter, loggerFields inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener
conditionContext, registryAccess -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(@NotNull Map<net.minecraft.resources.ResourceLocation, FramebufferDefinition> data, @NotNull net.minecraft.server.packs.resources.ResourceManager resourceManager, @NotNull net.minecraft.util.profiling.ProfilerFiller profilerFiller) voidclear()Clears all framebuffers at the start of the next frame.voidfree()@Nullable AdvancedFbogetFramebuffer(net.minecraft.resources.ResourceLocation name) Retrieves a framebuffer by the specified name.Map<net.minecraft.resources.ResourceLocation,AdvancedFbo> voidresizeFramebuffers(int width, int height) Methods inherited from class foundry.veil.resource.CodecReloadListener
prepareMethods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
reloadMethods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener
injectContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lwjgl.system.NativeResource
closeMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
FRAMEBUFFER_CODEC
public static final com.mojang.serialization.Codec<net.minecraft.resources.ResourceLocation> FRAMEBUFFER_CODEC
-
-
Constructor Details
-
FramebufferManager
public FramebufferManager()Creates a new instance of the framebuffer manager.
-
-
Method Details
-
resizeFramebuffers
@Internal public void resizeFramebuffers(int width, int height) -
clear
@Internal public void clear()Clears all framebuffers at the start of the next frame. -
getFramebuffer
@Nullable public @Nullable AdvancedFbo getFramebuffer(net.minecraft.resources.ResourceLocation name) Retrieves a framebuffer by the specified name.- Parameters:
name- The name of the framebuffer to retrieve.- Returns:
- The framebuffer by that name
-
getFramebuffers
- Returns:
- All custom framebuffers loaded
-
apply
protected void apply(@NotNull @NotNull Map<net.minecraft.resources.ResourceLocation, FramebufferDefinition> data, @NotNull @NotNull net.minecraft.server.packs.resources.ResourceManager resourceManager, @NotNull @NotNull net.minecraft.util.profiling.ProfilerFiller profilerFiller) - Specified by:
applyin classnet.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,FramebufferDefinition>>
-
free
public void free()- Specified by:
freein interfaceorg.lwjgl.system.NativeResource
-