Class DynamicCubemapTexture
java.lang.Object
net.minecraft.client.renderer.texture.AbstractTexture
foundry.veil.api.client.render.texture.CubemapTexture
foundry.veil.api.client.render.texture.DynamicCubemapTexture
- All Implemented Interfaces:
AutoCloseable
Dynamic implementation of
CubemapTexture
. Must call init(int, int)
before it can be used.-
Field Summary
Fields inherited from class net.minecraft.client.renderer.texture.AbstractTexture
blur, id, mipmap, NOT_ASSIGNED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(int width, int height) Initializes each face to the same size white texture.void
load
(net.minecraft.server.packs.resources.ResourceManager resourceManager) void
upload
(int face, com.mojang.blaze3d.platform.NativeImage image) Uploads the specified image to the specified face.void
upload
(com.mojang.blaze3d.platform.NativeImage image) Uploads the same image to all faces of the cubemap.void
upload
(net.minecraft.core.Direction face, com.mojang.blaze3d.platform.NativeImage image) Uploads the specified image to the specified face.Methods inherited from class foundry.veil.api.client.render.texture.CubemapTexture
bind, getGlFace, setFilter
Methods inherited from class net.minecraft.client.renderer.texture.AbstractTexture
close, getId, releaseId, reset
-
Constructor Details
-
DynamicCubemapTexture
public DynamicCubemapTexture()
-
-
Method Details
-
init
public void init(int width, int height) Initializes each face to the same size white texture.- Parameters:
width
- The width of each faceheight
- The height of each face
-
upload
public void upload(com.mojang.blaze3d.platform.NativeImage image) Uploads the same image to all faces of the cubemap.- Parameters:
image
- The image to upload
-
upload
public void upload(net.minecraft.core.Direction face, com.mojang.blaze3d.platform.NativeImage image) Uploads the specified image to the specified face.- Parameters:
face
- The face to upload toimage
- The image to upload
-
upload
public void upload(int face, com.mojang.blaze3d.platform.NativeImage image) Uploads the specified image to the specified face.- Parameters:
face
- The face to upload toimage
- The image to upload
-
load
public void load(net.minecraft.server.packs.resources.ResourceManager resourceManager) throws IOException - Specified by:
load
in classnet.minecraft.client.renderer.texture.AbstractTexture
- Throws:
IOException
-