Android GLSurfaceView.EGLConfigChooser - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android GLSurfaceView.EGLConfigChooser class.

This code example shows how to use the following methods:chooseConfig
		/* We can now initialize EGL for that display. */ 
		final int[] version = new int[2];
		if(!this.mEGL.eglInitialize(this.mEGLDisplay, version)) {
			throw new AndEngineRuntimeException(EGLHelper.class.getSimpleName() + ".eglInitialize failed." + " @(Thread: '" + Thread.currentThread().getName() + "')");
		} 
		this.mEGLConfig = this.mEGLConfigChooser.chooseConfig(this.mEGL, this.mEGLDisplay);
 
		/* Create an OpenGL ES context. This must be done only once, an OpenGL context is a somewhat heavy object. */ 
		this.mEGLContext = this.mEGL.eglCreateContext(this.mEGLDisplay, this.mEGLConfig, EGL10.EGL_NO_CONTEXT, EGLHelper.EGL_ATTRIBUTES);
		if (this.mEGLContext == null || this.mEGLContext == EGL10.EGL_NO_CONTEXT) {
			throw new RuntimeException("createContext failed");
		} 
 
		this.mEGLSurface = null;
	} 
 
	/** 
	 * React to the creation of a new surface by creating and returning an 
	 * OpenGL interface that renders to that surface. 
	 */ 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:chooseConfig
		/* 
		 * We can now initialize EGL for that display 
		 */ 
		final int[] version = new int[2];
		this.mEgl.eglInitialize(this.mEglDisplay, version);
		this.mEglConfig = this.mEGLConfigChooser.chooseConfig(this.mEgl, this.mEglDisplay);
 
		/* 
		 * Create an OpenGL ES context. This must be done only once, an OpenGL 
		 * context is a somewhat heavy object. 
		 */ 
		this.mEglContext = this.mEGLContextFactory.createContext(this.mEgl, this.mEglDisplay, this.mEglConfig);
		if (this.mEglContext == null || this.mEglContext == EGL10.EGL_NO_CONTEXT) {
			throw new RuntimeException("createContext failed");
		} 
 
		this.mEglSurface = null;
	} 
 
	/* 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:chooseConfig
		/* 
		 * We can now initialize EGL for that display 
		 */ 
		final int[] version = new int[2];
		this.mEgl.eglInitialize(this.mEglDisplay, version);
		this.mEglConfig = this.mEGLConfigChooser.chooseConfig(this.mEgl, this.mEglDisplay);
 
		/* 
		 * Create an OpenGL ES context. This must be done only once, an OpenGL 
		 * context is a somewhat heavy object. 
		 */ 
		this.mEglContext = this.mEGLContextFactory.createContext(this.mEgl, this.mEglDisplay, this.mEglConfig);
		if (this.mEglContext == null || this.mEglContext == EGL10.EGL_NO_CONTEXT) {
			throw new RuntimeException("createContext failed");
		} 
 
		this.mEglSurface = null;
	} 
 
	/* 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:chooseConfig
		/* 
		 * We can now initialize EGL for that display 
		 */ 
		final int[] version = new int[2];
		this.mEgl.eglInitialize(this.mEglDisplay, version);
		this.mEglConfig = this.mEGLConfigChooser.chooseConfig(this.mEgl, this.mEglDisplay);
 
		/* 
		 * Create an OpenGL ES context. This must be done only once, an OpenGL 
		 * context is a somewhat heavy object. 
		 */ 
		this.mEglContext = this.mEGLContextFactory.createContext(this.mEgl, this.mEglDisplay, this.mEglConfig);
		if (this.mEglContext == null || this.mEglContext == EGL10.EGL_NO_CONTEXT) {
			throw new RuntimeException("createContext failed");
		} 
 
		this.mEglSurface = null;
	} 
 
	/* 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:chooseConfig
		/* We can now initialize EGL for that display. */ 
		final int[] version = new int[2];
		if(!this.mEGL.eglInitialize(this.mEGLDisplay, version)) {
			throw new AndEngineRuntimeException(EGLHelper.class.getSimpleName() + ".eglInitialize failed." + " @(Thread: '" + Thread.currentThread().getName() + "')");
		} 
		this.mEGLConfig = this.mEGLConfigChooser.chooseConfig(this.mEGL, this.mEGLDisplay);
 
		/* Create an OpenGL ES context. This must be done only once, an OpenGL context is a somewhat heavy object. */ 
		this.mEGLContext = this.mEGL.eglCreateContext(this.mEGLDisplay, this.mEGLConfig, EGL10.EGL_NO_CONTEXT, EGLHelper.EGL_ATTRIBUTES);
		if (this.mEGLContext == null || this.mEGLContext == EGL10.EGL_NO_CONTEXT) {
			throw new RuntimeException("createContext failed");
		} 
 
		this.mEGLSurface = null;
	} 
 
	/** 
	 * React to the creation of a new surface by creating and returning an 
	 * OpenGL interface that renders to that surface. 
	 */ 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:chooseConfig
			if (mEglConfig == null) {
				// Log.d("EglHelper" + instanceId, "getting new config"); 
				// We can now initialize EGL for that display 
				int[] version = new int[2];
				mEgl.eglInitialize(mEglDisplay, version);
				mEglConfig = mEGLConfigChooser.chooseConfig(mEgl, mEglDisplay);
			} else { 
				// Log.d("EglHelper" + instanceId, "reusing config"); 
			} 
 
			if (mEglContext == null) {
				// Log.d("EglHelper" + instanceId, "creating new context"); 
				// Create an OpenGL ES context. This must be done only once, an OpenGL context is a somewhat heavy object. 
				mEglContext = mEGLContextFactory.createContext(mEgl, mEglDisplay, mEglConfig);
				if (mEglContext == null || mEglContext == EGL10.EGL_NO_CONTEXT) {
					throw new RuntimeException("createContext failed");
				} 
			} else { 
				// Log.d("EglHelper" + instanceId, "reusing context"); 
			} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:chooseConfig
		/* We can now initialize EGL for that display. */ 
		final int[] version = new int[2];
		if(!this.mEGL.eglInitialize(this.mEGLDisplay, version)) {
			throw new AndEngineRuntimeException(EGLHelper.class.getSimpleName() + ".eglInitialize failed." + " @(Thread: '" + Thread.currentThread().getName() + "')");
		} 
		this.mEGLConfig = this.mEGLConfigChooser.chooseConfig(this.mEGL, this.mEGLDisplay);
 
		/* Create an OpenGL ES context. This must be done only once, an OpenGL context is a somewhat heavy object. */ 
		this.mEGLContext = this.mEGL.eglCreateContext(this.mEGLDisplay, this.mEGLConfig, EGL10.EGL_NO_CONTEXT, EGLHelper.EGL_ATTRIBUTES);
		if (this.mEGLContext == null || this.mEGLContext == EGL10.EGL_NO_CONTEXT) {
			throw new RuntimeException("createContext failed");
		} 
 
		this.mEGLSurface = null;
	} 
 
	/** 
	 * React to the creation of a new surface by creating and returning an 
	 * OpenGL interface that renders to that surface. 
	 */ 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Android GLSurfaceView.EGLConfigChooser Methods: