Example usage for android.opengl GLES20 glValidateProgram

List of usage examples for android.opengl GLES20 glValidateProgram

Introduction

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

Prototype

public static native void glValidateProgram(int program);

Source Link

Usage

From source file:Main.java

private static int validateProgram(int program) {
    int[] status = new int[1];
    GLES20.glValidateProgram(program);

    GLES20.glGetProgramiv(program, GLES20.GL_VALIDATE_STATUS, status, 0);
    if (status[0] != GLES20.GL_TRUE) {
        Log.e(TAG, "Error validating program: " + GLES20.glGetProgramInfoLog(program));
        return 0;
    }//from w  w  w.  ja  va2 s . c  o  m
    return 1;
}