@Environment(value=CLIENT) public class TextureUtil extends Object
Constructor and Description |
---|
TextureUtil() |
Modifier and Type | Method and 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 for
maxLevel+1
mip levels to texture id . |
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)
Uploads
imageData to the bound texture. |
private static final Logger LOGGER
public static int generateId()
public static void deleteId(int id)
public static void allocate(int id, int width, int height)
public static void allocate(NativeImage.GLFormat internalFormat, int id, int width, int height)
public static void allocate(int id, int maxLevel, int width, int height)
public static void allocate(NativeImage.GLFormat internalFormat, int id, int maxLevel, int width, int height)
maxLevel+1
mip levels to texture id
.private static void bind(int id)
public static ByteBuffer readAllToByteBuffer(InputStream inputStream) throws IOException
IOException
public static String readAllToString(InputStream inputStream)
public static void uploadImage(IntBuffer imageData, int width, int height)
imageData
to the bound texture.
Each integer is interpreted as 0xAARRGGBB.