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.util.Log;

public class Main {
    private static final String TAG = "GL utils";

    private static int linkProgram(int program) {
        int[] status = new int[1];
        GLES20.glLinkProgram(program);
        GLES20.glGetProgramiv(program, GLES20.GL_LINK_STATUS, status, 0);
        if (status[0] != GLES20.GL_TRUE) {
            Log.e(TAG, "Error linking program: " + GLES20.glGetProgramInfoLog(program));
            return 0;
        }
        return 1;
    }
}