Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.pm.ConfigurationInfo;

public class Main {
    /**
     * The GLES version used by an application.
     * The upper order 16 bits represent the major version and the lower order 16 bits the minor version.
     * @param gles_version "reqGlEsVersion"
     * @return Readable version of OpenGL ES, like 0x00030000 - 3.0
     */
    public static String getGlEsVersion(int gles_version) {
        switch (gles_version) {
        case ConfigurationInfo.GL_ES_VERSION_UNDEFINED://0
            return "GL_ES_VERSION_UNDEFINED";
        default:
            return String.format("%1$d.%2$d", gles_version >> 16, gles_version & 0x00001111);
        }
    }
}