private void texImage2D(VideoRenderer.I420Frame frame, int[] textures)
{
for (int i = 0; i < 3; ++i)
{
ByteBuffer plane = frame.YuvPlanes[i];
GLES20.GlActiveTexture(GLES20.GlTexture0 + i);
GLES20.GlBindTexture(GLES20.GlTexture2d, textures[i]);
int w = i == 0 ? frame.Width : frame.Width / 2;
int h = i == 0 ? frame.Height : frame.Height / 2;
abortUnless(w == frame.YuvStrides[i], frame.YuvStrides[i] + "!=" + w);
GLES20.GlTexImage2D(GLES20.GlTexture2d, 0, GLES20.GlLuminance, w, h, 0, GLES20.GlLuminance, GLES20.GlUnsignedByte, plane);
}
checkNoGLES2Error();
}