Package net.minecraft.client.texture
Class TextureUtil
java.lang.Object
net.minecraft.client.texture.TextureUtil
@Environment(CLIENT) public class TextureUtil extends Object
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TextureUtil() -
Method Summary
Modifier and Type Method Description static voidallocate(int id, int width, int height)static voidallocate(int id, int maxLevel, int width, int height)static voidallocate(NativeImage.GLFormat internalFormat, int id, int width, int height)static voidallocate(NativeImage.GLFormat internalFormat, int id, int maxLevel, int width, int height)Allocate uninitialized backing memory formaxLevel+1mip levels to textureid.private static voidbind(int id)static voiddeleteId(int id)static intgenerateId()static ByteBufferreadAllToByteBuffer(InputStream inputStream)static StringreadAllToString(InputStream inputStream)static voiduploadImage(IntBuffer imageData, int width, int height)UploadsimageDatato the bound texture.
-
Field Details
-
LOGGER
-
-
Constructor Details
-
TextureUtil
public TextureUtil()
-
-
Method Details
-
generateId
public static int generateId() -
deleteId
public static void deleteId(int id) -
allocate
public static void allocate(int id, int width, int height) -
allocate
-
allocate
public static void allocate(int id, int maxLevel, int width, int height) -
allocate
public static void allocate(NativeImage.GLFormat internalFormat, int id, int maxLevel, int width, int height)Allocate uninitialized backing memory formaxLevel+1mip levels to textureid. -
bind
private static void bind(int id) -
readAllToByteBuffer
- Throws:
IOException
-
readAllToString
-
uploadImage
UploadsimageDatato the bound texture. Each integer is interpreted as 0xAARRGGBB.
-