Java Code Examples for com.jme3.texture.Texture.WrapMode#EdgeClamp

The following examples show how to use com.jme3.texture.Texture.WrapMode#EdgeClamp . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: J3MOutputCapsule.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
protected static String formatWrapMode(Texture texVal, Texture.WrapAxis axis) {
    WrapMode mode;
    try {
        mode = texVal.getWrap(axis);
    } catch (IllegalArgumentException e) {
        //this axis doesn't exist on the texture
        return "";
    }
    if (mode != WrapMode.EdgeClamp) {
        return "Wrap" + mode.name() + "_" + axis.name() + " ";
    }
    return "";
}
 
Example 2
Source File: MatParam.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private String getWrapMode(Texture texVal, Texture.WrapAxis axis) {
    WrapMode mode = WrapMode.EdgeClamp;
    try{
        mode = texVal.getWrap(axis);
    }catch (IllegalArgumentException e){
        //this axis doesn't exist on the texture
        return "";
    }
    if(mode != WrapMode.EdgeClamp){
        return"Wrap"+ mode.name() + "_" + axis.name() + " ";
    }
    return "";
}