int height = frame.getHeight(); int half_width = (width + 1) >> 1; int half_height = (height +1) >> 1;
void updateTextures(Frame frame) { int width = frame.getWidth(); int height = frame.getHeight(); int half_width = (width + 1) >> 1; int half_height = (height +1) >> 1;
void updateTextures(Frame frame) { int width = frame.getWidth(); int height = frame.getHeight(); int half_width = (width + 1) >> 1; int half_height = (height + 1) >> 1;
void setupTextures(Frame frame) { if (mTextureIds[0] != 0) { GLES20.glDeleteTextures(3, mTextureIds, 0); } GLES20.glGenTextures(3, mTextureIds, 0); int w = frame.getWidth(); int h = frame.getHeight(); int hw = (w + 1) >> 1; int hh = (h + 1) >> 1; initializeTexture(GLES20.GL_TEXTURE0, mTextureIds[0], w, h); initializeTexture(GLES20.GL_TEXTURE1, mTextureIds[1], hw, hh); initializeTexture(GLES20.GL_TEXTURE2, mTextureIds[2], hw, hh); mTextureWidth = frame.getWidth(); mTextureHeight = frame.getHeight(); }
void setupTextures(Frame frame) { if (mTextureIds[0] != 0) { GLES20.glDeleteTextures(3, mTextureIds, 0); } GLES20.glGenTextures(3, mTextureIds, 0); int w = frame.getWidth(); int h = frame.getHeight(); int hw = (w + 1) >> 1; int hh = (h +1) >> 1; initializeTexture(GLES20.GL_TEXTURE0, mTextureIds[0], w, h); initializeTexture(GLES20.GL_TEXTURE1, mTextureIds[1], hw, hh); initializeTexture(GLES20.GL_TEXTURE2, mTextureIds[2], hw, hh); mTextureWidth = frame.getWidth(); mTextureHeight = frame.getHeight(); }