Code example for EGLContext

Methods: getGL

0
 
		/* 
		 * Before we can issue GL commands, we need to make sure the context is 
		 * current and bound to a surface. 
		 */ 
		if (!this.mEgl.eglMakeCurrent(this.mEglDisplay, this.mEglSurface, this.mEglSurface, this.mEglContext)) {
			throw new RuntimeException("eglMakeCurrent failed.");
		} 
 
		GL gl = this.mEglContext.getGL();
		if (this.mGLWrapper != null) {
			gl = this.mGLWrapper.wrap(gl);
		} 
 
		/* 
		 * if ((mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS))!= 0) 
		 * { int configFlags = 0; Writer log = null; if ((mDebugFlags & 
		 * DEBUG_CHECK_GL_ERROR) != 0) { configFlags |= 
		 * GLDebugHelper.CONFIG_CHECK_GL_ERROR; } if ((mDebugFlags & 
		 * DEBUG_LOG_GL_CALLS) != 0) { log = new LogWriter(); } gl = 
		 * GLDebugHelper.wrap(gl, configFlags, log); }