Example usage for android.opengl GLES20 GL_VERSION

List of usage examples for android.opengl GLES20 GL_VERSION

Introduction

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

Prototype

int GL_VERSION

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

Click Source Link

Usage

From source file:Main.java

/**
 * Writes GL version info to the log.//  w w w.j  a  v  a2 s .c  o m
 */
public static void logVersionInfo() {
    Log.i(TAG, "vendor  : " + GLES20.glGetString(GLES20.GL_VENDOR));
    Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER));
    Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION));

    if (false) {
        int[] values = new int[1];
        GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0);
        int majorVersion = values[0];
        GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0);
        int minorVersion = values[0];
        if (GLES30.glGetError() == GLES30.GL_NO_ERROR) {
            Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion);
        }
    }
}