Class DynamicTexture
java.lang.Object
net.minecraft.client.renderer.texture.AbstractTexture
team.lodestar.lodestone.systems.rendering.multipass.DynamicTexture
- All Implemented Interfaces:
AutoCloseable
public class DynamicTexture
extends net.minecraft.client.renderer.texture.AbstractTexture
-
Field Summary
Fields inherited from class net.minecraft.client.renderer.texture.AbstractTexture
blur, id, mipmap, NOT_ASSIGNED -
Constructor Summary
ConstructorsConstructorDescriptionDynamicTexture(net.minecraft.resources.ResourceLocation resourceLocation, int size) DynamicTexture(net.minecraft.resources.ResourceLocation resourceLocation, int width, int height) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()voiddownload()Downloads the GPU texture to CPU for editcom.mojang.blaze3d.pipeline.RenderTargetintintgetId()com.mojang.blaze3d.platform.NativeImagenet.minecraft.resources.ResourceLocationintgetWidth()voidload(net.minecraft.server.packs.resources.ResourceManager manager) voidsaveTextureToFile(Path texturesDir) voidupload()Uploads the image to GPU and closes its CPU side oneMethods inherited from class net.minecraft.client.renderer.texture.AbstractTexture
bind, reset, restoreLastBlurMipmap, setBlurMipmap, setFilter
-
Constructor Details
-
DynamicTexture
public DynamicTexture(net.minecraft.resources.ResourceLocation resourceLocation, int width, int height) -
DynamicTexture
public DynamicTexture(net.minecraft.resources.ResourceLocation resourceLocation, int size)
-
-
Method Details
-
load
public void load(net.minecraft.server.packs.resources.ResourceManager manager) - Specified by:
loadin classnet.minecraft.client.renderer.texture.AbstractTexture
-
getFrameBuffer
public com.mojang.blaze3d.pipeline.RenderTarget getFrameBuffer() -
bindWrite
public void bindWrite() -
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getTextureLocation
public net.minecraft.resources.ResourceLocation getTextureLocation() -
getId
public int getId()- Overrides:
getIdin classnet.minecraft.client.renderer.texture.AbstractTexture
-
releaseId
public void releaseId()- Overrides:
releaseIdin classnet.minecraft.client.renderer.texture.AbstractTexture
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classnet.minecraft.client.renderer.texture.AbstractTexture
-
getPixels
public com.mojang.blaze3d.platform.NativeImage getPixels() -
download
public void download()Downloads the GPU texture to CPU for edit -
upload
public void upload()Uploads the image to GPU and closes its CPU side one -
saveTextureToFile
- Throws:
IOException
-