Java tutorial
//package com.java2s; //License from project: Apache License import java.nio.IntBuffer; import javax.microedition.khronos.opengles.GL10; public class Main { private static IntBuffer mMaxTexSize; private static IntBuffer mMaxTexUnits; public static String getGLVendorInfo(GL10 gl) { int[] maxTexSize = getMaxTextureSize(gl); int[] maxTexUnits = getMaxTextureUnits(gl); return String.format( "GL version: %s\nGL vendor: %s\nGL renderer: %s\nGL extensions: %s\nGL max texture size: %d\nGL max texture unit: %d\n", gl.glGetString(GL10.GL_VERSION), gl.glGetString(GL10.GL_VENDOR), gl.glGetString(GL10.GL_RENDERER), gl.glGetString(GL10.GL_EXTENSIONS), maxTexSize[0], maxTexUnits[0]); } public static int[] getMaxTextureSize(GL10 gl) { gl.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, mMaxTexSize); return mMaxTexSize.array(); } public static int[] getMaxTextureUnits(GL10 gl) { gl.glGetIntegerv(GL10.GL_MAX_TEXTURE_UNITS, mMaxTexUnits); return mMaxTexUnits.array(); } }