Code example for GLSurfaceView

Methods: requestRender

0
		/** 
		 * Animates flip position to requested position. 
		 */ 
		public void moveFlipPosition(float posY) {
			mFlipPositionTarget = posY;
			mViewRenderer.requestRender();
		} 
 
		@Override 
		public void onDrawFrame(GL10 unused) {
 
			// Disable unneeded rendering flags. 
			GLES20.glDisable(GLES20.GL_DEPTH_TEST);
			GLES20.glDisable(GLES20.GL_CULL_FACE);
 
			// Allocate new texture ids if needed. 
			if (mTextureIds == null) {
				mTextureIds = new int[2];
				GLES20.glGenTextures(2, mTextureIds, 0);
				for (int textureId : mTextureIds) {
					// Set texture attributes.