public class TextureUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TextureUtil.GLImageFormat |
Constructor and Description |
---|
TextureUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
convertTextureFormat(Image.Format fmt) |
static TextureUtil.GLImageFormat |
getImageFormat(Image.Format fmt,
boolean isSrgb) |
static TextureUtil.GLImageFormat |
getImageFormatWithError(Image.Format fmt,
boolean isSrgb) |
static void |
uploadSubTexture(Image image,
int target,
int index,
int x,
int y,
boolean linearizeSrgb)
Update the texture currently bound to target at with data from the given Image at position x and y.
|
static void |
uploadTexture(Image image,
int target,
int index,
int border,
boolean linearizeSrgb) |
public static int convertTextureFormat(Image.Format fmt)
public static TextureUtil.GLImageFormat getImageFormat(Image.Format fmt, boolean isSrgb)
public static TextureUtil.GLImageFormat getImageFormatWithError(Image.Format fmt, boolean isSrgb)
public static void uploadTexture(Image image, int target, int index, int border, boolean linearizeSrgb)
public static void uploadSubTexture(Image image, int target, int index, int x, int y, boolean linearizeSrgb)
image
- Image with the source data (this data will be put into the texture)target
- the target textureindex
- the mipmap level to updatex
- the x position where to put the image in the texturey
- the y position where to put the image in the texture