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

public class DynamicCubemapTexture extends CubemapTexture
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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 face
      height - 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 to
      image - 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 to
      image - The image to upload
    • load

      public void load(net.minecraft.server.packs.resources.ResourceManager resourceManager) throws IOException
      Specified by:
      load in class net.minecraft.client.renderer.texture.AbstractTexture
      Throws:
      IOException