Package org.boxutil.manager
Class TextureManager
java.lang.Object
org.boxutil.manager.TextureManager
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intdeleteAutoGenNormal(int srcTexture) static intdeleteTexture(String file) static intgenNormalForTexture(int srcTexture, boolean keyCheck, ShaderUtil.NormalMapGenParam param) static intgenNormalForTexture(int srcTexture, int width, int height, boolean keyCheck, ShaderUtil.NormalMapGenParam param) static intgetAutoGenNormal(int srcTexture) static intgetTexture(String file) static booleanhaveAutoGenNormal(int srcTexture) static booleanhaveTexture(String file) static int[]loadTangentMap(String file, boolean isAngleMap, boolean useTextureStorage, boolean potAligned) static int[]loadTexture(String file) static int[]loadTexture(String file, int channelNum, boolean is1DTexture, boolean uintTexture, boolean useTextureStorage, boolean nearestSampler, boolean potAligned) static int[]loadTextureChannel3(String file) static int[]loadTextureRGBA8(String file, boolean alignForward, boolean is1DTexture, boolean useTextureStorage, boolean nearestSampler, boolean potAligned) static intputAutoGenNormal(int srcTexture, int normal) static intputTexture(String file, int texture) static inttryNormalForTexture(int srcTexture) static inttryTangent(String file, boolean isAngleMap, boolean useTextureStorage, boolean potAligned) static inttryTexture(String file) static inttryTexture(String file, int channelNum, boolean is1DTexture, boolean uintTexture, boolean useTextureStorage, boolean nearestSampler, boolean potAligned) static inttryTextureChannel3(String file) static inttryTextureRGBA(String file, boolean alignForward)
-
Field Details
-
ALIGN_FORWARD_SUFFIX
- See Also:
-
DEFAULT_AUTO_NORMAL_PARAM
-
-
Method Details
-
haveTexture
-
getTexture
-
putTexture
-
deleteTexture
-
haveAutoGenNormal
public static boolean haveAutoGenNormal(int srcTexture) -
getAutoGenNormal
public static int getAutoGenNormal(int srcTexture) -
putAutoGenNormal
public static int putAutoGenNormal(int srcTexture, int normal) -
deleteAutoGenNormal
public static int deleteAutoGenNormal(int srcTexture) -
loadTexture
public static int[] loadTexture(@NotNull String file, int channelNum, boolean is1DTexture, boolean uintTexture, boolean useTextureStorage, boolean nearestSampler, boolean potAligned) - Returns:
- int[] = {textureID, pixelPreImage, ivec2(size), ivec2(localSize), ivec3(averageColor), ivec3(averageBrightColor)}
-
loadTextureRGBA8
public static int[] loadTextureRGBA8(@NotNull String file, boolean alignForward, boolean is1DTexture, boolean useTextureStorage, boolean nearestSampler, boolean potAligned) - Parameters:
alignForward-truerotate the image from facing upward to facing right, i.e. rotate it in -90 angle, that force it point to positive x-axis rather than positive y-axis.Also, if set to
true, will store the texture as key:<pathAndName>ALIGN_FORWARD_SUFFIX.<format>- Returns:
- int[] = {textureID, ivec2(size), ivec2(localSize), ivec3(averageColor), ivec3(averageBrightColor)}
-
loadTexture
- Returns:
- int[] = {textureID, pixelPreImage, ivec2(size), ivec2(localSize), ivec3(averageColor), ivec3(averageBrightColor)}
-
loadTextureChannel3
- Returns:
- int[] = {textureID, pixelPreImage, ivec2(size), ivec2(localSize), ivec3(averageColor), ivec3(averageBrightColor)}
-
loadTangentMap
public static int[] loadTangentMap(@NotNull String file, boolean isAngleMap, boolean useTextureStorage, boolean potAligned) - Returns:
- int[] = {textureID, pixelPreImage, ivec2(size), ivec2(localSize)}
-
tryTexture
public static int tryTexture(@NotNull String file, int channelNum, boolean is1DTexture, boolean uintTexture, boolean useTextureStorage, boolean nearestSampler, boolean potAligned) -
tryTextureRGBA
-
tryTexture
-
tryTextureChannel3
-
tryTangent
public static int tryTangent(@NotNull String file, boolean isAngleMap, boolean useTextureStorage, boolean potAligned) -
genNormalForTexture
public static int genNormalForTexture(int srcTexture, int width, int height, boolean keyCheck, ShaderUtil.NormalMapGenParam param) -
genNormalForTexture
public static int genNormalForTexture(int srcTexture, boolean keyCheck, ShaderUtil.NormalMapGenParam param) -
tryNormalForTexture
public static int tryNormalForTexture(int srcTexture)
-