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 void
allocate(int id, int width, int height)
static void
allocate(int id, int maxLevel, int width, int height)
static void
allocate(NativeImage.GLFormat internalFormat, int id, int width, int height)
static void
allocate(NativeImage.GLFormat internalFormat, int id, int maxLevel, int width, int height)
Allocate uninitialized backing memory formaxLevel+1
mip levels to textureid
.private static void
bind(int id)
static void
deleteId(int id)
static int
generateId()
static ByteBuffer
readAllToByteBuffer(InputStream inputStream)
static String
readAllToString(InputStream inputStream)
static void
uploadImage(IntBuffer imageData, int width, int height)
UploadsimageData
to 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+1
mip levels to textureid
. -
bind
private static void bind(int id) -
readAllToByteBuffer
- Throws:
IOException
-
readAllToString
-
uploadImage
UploadsimageData
to the bound texture. Each integer is interpreted as 0xAARRGGBB.
-