Package com.mojang.blaze3d.platform
Class TextureUtil
java.lang.Object
com.mojang.blaze3d.platform.TextureUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final org.slf4j.Loggerstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidbind(int pTextureId) static intstatic Pathstatic PathgetDebugTexturePath(Path pBasePath) static voidprepareImage(int pTextureId, int pWidth, int pHeight) static voidprepareImage(int pTextureId, int pMipmapLevel, int pWidth, int pHeight) static voidprepareImage(NativeImage.InternalGlFormat pPixelFormat, int pTextureId, int pWidth, int pHeight) static voidprepareImage(NativeImage.InternalGlFormat pPixelFormat, int pTextureId, int pMipmapLevel, int pWidth, int pHeight) static ByteBufferreadResource(InputStream pInputStream) private static ByteBufferreadResource(ReadableByteChannel pChannel, int pSize) static voidreleaseTextureId(int pTextureId) static voidwriteAsPNG(Path pOutputDir, String pTextureName, int pTextureId, int pAmount, int pWidth, int pHeight) static voidwriteAsPNG(Path pOutputDir, String pTextureName, int pTextureId, int pAmount, int pWidth, int pHeight, IntUnaryOperator pFunction)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MIN_MIPMAP_LEVEL
public static final int MIN_MIPMAP_LEVEL- See Also:
-
DEFAULT_IMAGE_BUFFER_SIZE
private static final int DEFAULT_IMAGE_BUFFER_SIZE- See Also:
-
-
Constructor Details
-
TextureUtil
public TextureUtil()
-
-
Method Details
-
generateTextureId
public static int generateTextureId() -
releaseTextureId
public static void releaseTextureId(int pTextureId) -
prepareImage
public static void prepareImage(int pTextureId, int pWidth, int pHeight) -
prepareImage
public static void prepareImage(NativeImage.InternalGlFormat pPixelFormat, int pTextureId, int pWidth, int pHeight) -
prepareImage
public static void prepareImage(int pTextureId, int pMipmapLevel, int pWidth, int pHeight) -
prepareImage
public static void prepareImage(NativeImage.InternalGlFormat pPixelFormat, int pTextureId, int pMipmapLevel, int pWidth, int pHeight) -
bind
private static void bind(int pTextureId) -
readResource
- Throws:
IOException
-
readResource
- Throws:
IOException
-
writeAsPNG
-
writeAsPNG
public static void writeAsPNG(Path pOutputDir, String pTextureName, int pTextureId, int pAmount, int pWidth, int pHeight, @Nullable IntUnaryOperator pFunction) -
getDebugTexturePath
-
getDebugTexturePath
-