// Path: gltoolkit/src/main/java/com/quan404/gltoolkit/Constants.java
// public class Constants {
//     public static final int BYTES_PER_FLOAT = 4;
// }
// 
// Path: gltoolkit/src/main/java/com/quan404/gltoolkit/data/VertexArray.java
// public class VertexArray {
//     private final FloatBuffer floatBuffer;
// 
// 
//     public VertexArray(float[] vertexData){
//         floatBuffer =ByteBuffer.allocateDirect(vertexData.length * Constants.BYTES_PER_FLOAT)
//                 .order(ByteOrder.nativeOrder())
//                 .asFloatBuffer()
//                 .put(vertexData);
//     }
// 
//     public void setVertexAttribPointer( int dataOffset, int attributeLocation, int componentCount, int stride){
//         floatBuffer.position(dataOffset);
//         GLES20.glVertexAttribPointer(attributeLocation, componentCount, GLES20.GL_FLOAT, false, stride, floatBuffer);
//         GLES20.glEnableVertexAttribArray(attributeLocation);
// 
//         floatBuffer.position(0);
//     }
// }
// 
// Path: gltoolkit/src/main/java/com/quan404/gltoolkit/programs/VideoShaderProgram.java
// public class VideoShaderProgram extends ShaderProgram {
// 
//     public static final int DEFAULT_VERTEX_SHADER = com.quan404.gltoolkit.R.raw.default_vertex_shader;
//     public static final int DEFAULT_FRAGMENT_SHADER = com.quan404.gltoolkit.R.raw.default_fragment_shader;
// 
//     // Uniform locations
//     private int uMVPMatrixLocation;
//     private int uSTMatrixLocation;
// 
//     // Attribute locations
//     private int aPositionLocation;
//     private int aTextureCoordinatesLocation;
// 
//     public VideoShaderProgram(Context context, int vertexShaderResourceId, int fragmentShaderResourceId) {
//         super(context, vertexShaderResourceId, fragmentShaderResourceId);
// 
//         aPositionLocation = GLES20.glGetAttribLocation(program, A_POSITION);
//         aTextureCoordinatesLocation = GLES20.glGetAttribLocation(program, A_TEXTURE_COORDINATES);
// 
//         uMVPMatrixLocation = GLES20.glGetUniformLocation(program, U_MVPMATRIX);
//         uSTMatrixLocation = GLES20.glGetUniformLocation(program, U_STMATRIX);
//     }
// 
//     public int getPositionAttributeLocation() {
//         return aPositionLocation;
//     }
// 
//     public int getTextureCoordinatesAttributeLocation() {
//         return aTextureCoordinatesLocation;
//     }
//     public void setUniforms(float[] mvpMatrix, float[] stMatrix){
//         GLES20.glUniformMatrix4fv(uMVPMatrixLocation, 1, false, mvpMatrix, 0 );
//         GLES20.glUniformMatrix4fv(uSTMatrixLocation, 1, false, stMatrix, 0 );
//     }
// }


import android.opengl.GLES20;
import com.quan404.gltoolkit.Constants;
import com.quan404.gltoolkit.data.VertexArray;
import com.quan404.gltoolkit.programs.VideoShaderProgram;
import java.nio.FloatBuffer;
package com.quan404.gltoolkit.objects;




/**
 * Created by quanhua on 06/01/2016.
 */
public class Video {
    private static final int POSITION_COMPONENT_COUNT = 3;
    private static final int TEXTURE_COORDINATES_COMPONENT_COUNT = 2;
// Path: gltoolkit/src/main/java/com/quan404/gltoolkit/Constants.java
// public class Constants {
//     public static final int BYTES_PER_FLOAT = 4;
// }
// 
// Path: gltoolkit/src/main/java/com/quan404/gltoolkit/data/VertexArray.java
// public class VertexArray {
//     private final FloatBuffer floatBuffer;
// 
// 
//     public VertexArray(float[] vertexData){
//         floatBuffer =ByteBuffer.allocateDirect(vertexData.length * Constants.BYTES_PER_FLOAT)
//                 .order(ByteOrder.nativeOrder())
//                 .asFloatBuffer()
//                 .put(vertexData);
//     }
// 
//     public void setVertexAttribPointer( int dataOffset, int attributeLocation, int componentCount, int stride){
//         floatBuffer.position(dataOffset);
//         GLES20.glVertexAttribPointer(attributeLocation, componentCount, GLES20.GL_FLOAT, false, stride, floatBuffer);
//         GLES20.glEnableVertexAttribArray(attributeLocation);
// 
//         floatBuffer.position(0);
//     }
// }
// 
// Path: gltoolkit/src/main/java/com/quan404/gltoolkit/programs/VideoShaderProgram.java
// public class VideoShaderProgram extends ShaderProgram {
// 
//     public static final int DEFAULT_VERTEX_SHADER = com.quan404.gltoolkit.R.raw.default_vertex_shader;
//     public static final int DEFAULT_FRAGMENT_SHADER = com.quan404.gltoolkit.R.raw.default_fragment_shader;
// 
//     // Uniform locations
//     private int uMVPMatrixLocation;
//     private int uSTMatrixLocation;
// 
//     // Attribute locations
//     private int aPositionLocation;
//     private int aTextureCoordinatesLocation;
// 
//     public VideoShaderProgram(Context context, int vertexShaderResourceId, int fragmentShaderResourceId) {
//         super(context, vertexShaderResourceId, fragmentShaderResourceId);
// 
//         aPositionLocation = GLES20.glGetAttribLocation(program, A_POSITION);
//         aTextureCoordinatesLocation = GLES20.glGetAttribLocation(program, A_TEXTURE_COORDINATES);
// 
//         uMVPMatrixLocation = GLES20.glGetUniformLocation(program, U_MVPMATRIX);
//         uSTMatrixLocation = GLES20.glGetUniformLocation(program, U_STMATRIX);
//     }
// 
//     public int getPositionAttributeLocation() {
//         return aPositionLocation;
//     }
// 
//     public int getTextureCoordinatesAttributeLocation() {
//         return aTextureCoordinatesLocation;
//     }
//     public void setUniforms(float[] mvpMatrix, float[] stMatrix){
//         GLES20.glUniformMatrix4fv(uMVPMatrixLocation, 1, false, mvpMatrix, 0 );
//         GLES20.glUniformMatrix4fv(uSTMatrixLocation, 1, false, stMatrix, 0 );
//     }
// }


// Path: gltoolkit/src/main/java/com/quan404/gltoolkit/objects/Video.java
import android.opengl.GLES20;
import com.quan404.gltoolkit.Constants;
import com.quan404.gltoolkit.data.VertexArray;
import com.quan404.gltoolkit.programs.VideoShaderProgram;
import java.nio.FloatBuffer;

package com.quan404.gltoolkit.objects;




/**
 * Created by quanhua on 06/01/2016.
 */
public class Video {
    private static final int POSITION_COMPONENT_COUNT = 3;
    private static final int TEXTURE_COORDINATES_COMPONENT_COUNT = 2;
    private static final int STRIDE = (POSITION_COMPONENT_COUNT + TEXTURE_COORDINATES_COMPONENT_COUNT) * Constants.BYTES_PER_FLOAT;