Example usage for org.lwjgl.opengl EXTTextureMirrorClamp GL_MIRROR_CLAMP_EXT

List of usage examples for org.lwjgl.opengl EXTTextureMirrorClamp GL_MIRROR_CLAMP_EXT

Introduction

In this page you can find the example usage for org.lwjgl.opengl EXTTextureMirrorClamp GL_MIRROR_CLAMP_EXT.

Prototype

int GL_MIRROR_CLAMP_EXT

To view the source code for org.lwjgl.opengl EXTTextureMirrorClamp GL_MIRROR_CLAMP_EXT.

Click Source Link

Document

Accepted by the param parameter of TexParameteri and TexParameterf, and by the params parameter of TexParameteriv and TexParameterfv, when their pname parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R.

Usage

From source file:com.ardor3d.scene.state.lwjgl.LwjglTextureStateUtil.java

License:Open Source License

public static int getGLWrap(final WrapMode wrap, final ContextCapabilities caps) {
    switch (wrap) {
    case Repeat:/*from w  w  w  . j  a va  2 s  .  co m*/
        return GL11.GL_REPEAT;
    case MirroredRepeat:
        if (caps.isTextureMirroredRepeatSupported()) {
            return ARBTextureMirroredRepeat.GL_MIRRORED_REPEAT_ARB;
        } else {
            return GL11.GL_REPEAT;
        }
    case MirrorClamp:
        if (caps.isTextureMirrorClampSupported()) {
            return EXTTextureMirrorClamp.GL_MIRROR_CLAMP_EXT;
        }
        // FALLS THROUGH
    case Clamp:
        return GL11.GL_CLAMP;
    case MirrorBorderClamp:
        if (caps.isTextureMirrorBorderClampSupported()) {
            return EXTTextureMirrorClamp.GL_MIRROR_CLAMP_TO_BORDER_EXT;
        }
        // FALLS THROUGH
    case BorderClamp:
        if (caps.isTextureBorderClampSupported()) {
            return ARBTextureBorderClamp.GL_CLAMP_TO_BORDER_ARB;
        } else {
            return GL11.GL_CLAMP;
        }
    case MirrorEdgeClamp:
        if (caps.isTextureMirrorEdgeClampSupported()) {
            return EXTTextureMirrorClamp.GL_MIRROR_CLAMP_TO_EDGE_EXT;
        }
        // FALLS THROUGH
    case EdgeClamp:
        if (caps.isTextureEdgeClampSupported()) {
            return GL12.GL_CLAMP_TO_EDGE;
        } else {
            return GL11.GL_CLAMP;
        }
    }
    throw new IllegalArgumentException("invalid WrapMode type: " + wrap);
}