Example usage for android.opengl GLES20 GL_EXTENSIONS

List of usage examples for android.opengl GLES20 GL_EXTENSIONS

Introduction

In this page you can find the example usage for android.opengl GLES20 GL_EXTENSIONS.

Prototype

int GL_EXTENSIONS

To view the source code for android.opengl GLES20 GL_EXTENSIONS.

Click Source Link

Usage

From source file:Main.java

public static String[] getExtensions() {
    if (null == sExtenions) {
        sExtenions = GLES20.glGetString(GLES20.GL_EXTENSIONS).split("\\s");
    }//  w w  w  .ja  v a  2  s.  com
    return sExtenions;
}

From source file:Main.java

/**
 * Checks the GL_EXTENSIONS String for the given "extension". This method must only be called when a valid context
 * and surface is valid.//from   w  w w  . j  a  va2  s  .c o m
 *
 * @param extension
 * @return boolean
 */
public static boolean hasExtension(String extension) {
    String extensions = GLES20.glGetString(GLES20.GL_EXTENSIONS);

    boolean foundExtension = false;

    if (extensions != null) {
        foundExtension = extensions.toLowerCase().contains(extension.toLowerCase());
    }

    return foundExtension;
}

From source file:com.example.patrycja.wikitudeapp.AbstractArchitectCamActivity.java

/**
 * helper to check if video-drawables are supported by this device. recommended to check before launching ARchitect Worlds with videodrawables
 * @return true if AR.VideoDrawables are supported, false if fallback rendering would apply (= show video fullscreen)
 *//*from   w w w  .j  a v  a 2s  .co m*/
public static final boolean isVideoDrawablesSupported() {
    String extensions = GLES20.glGetString(GLES20.GL_EXTENSIONS);
    return extensions != null && extensions.contains("GL_OES_EGL_image_external")
            && android.os.Build.VERSION.SDK_INT >= 14;
}

From source file:com.wikitude.samples.AbstractArchitectCamActivity.java

/**
 * helper to check if video-drawables are supported by this device. recommended to check before launching ARchitect Worlds with videodrawables
 * @return true if AR.VideoDrawables are supported, false if fallback rendering would apply (= show video fullscreen)
 */// w  ww  . j a  v  a  2s .c  o  m
public static final boolean isVideoDrawablesSupported() {
    String extensions = GLES20.glGetString(GLES20.GL_EXTENSIONS);
    return extensions != null && extensions.contains("GL_OES_EGL_image_external");
}

From source file:at.kropf.curriculumvitae.augmented.AbstractArchitectCamActivity.java

/**
 * helper to check if video-drawables are supported by this device. recommended to check before launching ARchitect Worlds with videodrawables
 * @return true if AR.VideoDrawables are supported, false if fallback rendering would apply (= show video fullscreen)
 *//*from  w w w .ja v a2 s  .c om*/
public static final boolean isVideoDrawablesSupported() {
    String extensions = GLES20.glGetString(GLES20.GL_EXTENSIONS);
    return extensions != null && extensions.contains("GL_OES_EGL_image_external")
            && Build.VERSION.SDK_INT >= 14;
}

From source file:com.wikitude.virtualhome.AugmentedActivity.java

public static final boolean isVideoDrawablesSupported() {
    String extensions = GLES20.glGetString(GLES20.GL_EXTENSIONS);
    return extensions != null && extensions.contains("GL_OES_EGL_image_external")
            && android.os.Build.VERSION.SDK_INT >= 14;
}