// Path: videffects/src/main/java/com/sherazkhilji/videffects/Constants.java
// public static final int FLOAT_SIZE_BYTES = 4;


import android.opengl.GLES20;
import android.opengl.Matrix;
import android.util.Log;
import static android.opengl.GLES11Ext.GL_TEXTURE_EXTERNAL_OES;
import static com.sherazkhilji.videffects.Constants.FLOAT_SIZE_BYTES;
    protected abstract int getFragmentShader();

    protected int getTexture() {
        return textureHandles[0];
    }

    protected float[] getTransformMatrix() {
        return texMatrix;
    }

    private int createProgram() {
        int program = GLES20.glCreateProgram();
        if (program != 0) {
            GLES20.glAttachShader(program, getVertexShader());
            GLES20.glAttachShader(program, getFragmentShader());
            GLES20.glLinkProgram(program);
            GLES20.glGetProgramiv(program, GLES20.GL_LINK_STATUS, linkStatus, 0);
            if (linkStatus[0] != GLES20.GL_TRUE) {
                Log.e(TAG, "Could not link program: ");
                Log.e(TAG, GLES20.glGetProgramInfoLog(program));
                GLES20.glDeleteProgram(program);
                program = 0;
            }
        }
        return program;
    }

    protected void init() {
        GLES20.glGenBuffers(2, bufferHandles, 0);
        GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, bufferHandles[0]);
// Path: videffects/src/main/java/com/sherazkhilji/videffects/Constants.java
// public static final int FLOAT_SIZE_BYTES = 4;


// Path: videffects/src/main/java/com/sherazkhilji/videffects/model/BaseRenderer.java
import android.opengl.GLES20;
import android.opengl.Matrix;
import android.util.Log;
import static android.opengl.GLES11Ext.GL_TEXTURE_EXTERNAL_OES;
import static com.sherazkhilji.videffects.Constants.FLOAT_SIZE_BYTES;

    protected abstract int getFragmentShader();

    protected int getTexture() {
        return textureHandles[0];
    }

    protected float[] getTransformMatrix() {
        return texMatrix;
    }

    private int createProgram() {
        int program = GLES20.glCreateProgram();
        if (program != 0) {
            GLES20.glAttachShader(program, getVertexShader());
            GLES20.glAttachShader(program, getFragmentShader());
            GLES20.glLinkProgram(program);
            GLES20.glGetProgramiv(program, GLES20.GL_LINK_STATUS, linkStatus, 0);
            if (linkStatus[0] != GLES20.GL_TRUE) {
                Log.e(TAG, "Could not link program: ");
                Log.e(TAG, GLES20.glGetProgramInfoLog(program));
                GLES20.glDeleteProgram(program);
                program = 0;
            }
        }
        return program;
    }

    protected void init() {
        GLES20.glGenBuffers(2, bufferHandles, 0);
        GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, bufferHandles[0]);
        GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER, Utils.VERTICES.length * FLOAT_SIZE_BYTES, Utils.getVertexBuffer(), GLES20.GL_DYNAMIC_DRAW);