Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.opengl.GLES20;
import android.opengl.GLException;
import android.opengl.GLU;
import android.opengl.GLUtils;

public class Main {
    public static void checkGlError(String glOp) {
        int error = GLES20.glGetError();
        if (GLES20.GL_NO_ERROR != error) {
            String errorStr = GLU.gluErrorString(error);
            if (null == errorStr) {
                errorStr = GLUtils.getEGLErrorString(error);
            }

            String msg = glOp + " caused GL error 0x" + Integer.toHexString(error) + ":" + errorStr;
            throw new GLException(error, msg);
        }
    }
}