Java Code Examples for android.opengl.EGL14#EGL_TRUE
The following examples show how to use
android.opengl.EGL14#EGL_TRUE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EGLSurfaceTexture.java From MediaSDK with Apache License 2.0 | 6 votes |
private static EGLContext createEGLContext( EGLDisplay display, EGLConfig config, @SecureMode int secureMode) { int[] glAttributes; if (secureMode == SECURE_MODE_NONE) { glAttributes = new int[] {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL14.EGL_NONE}; } else { glAttributes = new int[] { EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE, EGL14.EGL_NONE }; } EGLContext context = EGL14.eglCreateContext( display, config, EGL14.EGL_NO_CONTEXT, glAttributes, 0); if (context == null) { throw new GlException("eglCreateContext failed"); } return context; }
Example 2
Source File: EGLSurfaceTexture.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
private static EGLContext createEGLContext( EGLDisplay display, EGLConfig config, @SecureMode int secureMode) { int[] glAttributes; if (secureMode == SECURE_MODE_NONE) { glAttributes = new int[] {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL14.EGL_NONE}; } else { glAttributes = new int[] { EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE, EGL14.EGL_NONE }; } EGLContext context = EGL14.eglCreateContext( display, config, android.opengl.EGL14.EGL_NO_CONTEXT, glAttributes, 0); if (context == null) { throw new GlException("eglCreateContext failed"); } return context; }
Example 3
Source File: EGLSurfaceTexture.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
private static EGLContext createEGLContext( EGLDisplay display, EGLConfig config, @SecureMode int secureMode) { int[] glAttributes; if (secureMode == SECURE_MODE_NONE) { glAttributes = new int[] {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL14.EGL_NONE}; } else { glAttributes = new int[] { EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE, EGL14.EGL_NONE }; } EGLContext context = EGL14.eglCreateContext( display, config, android.opengl.EGL14.EGL_NO_CONTEXT, glAttributes, 0); if (context == null) { throw new GlException("eglCreateContext failed"); } return context; }
Example 4
Source File: EGLSurfaceTexture.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
private static EGLContext createEGLContext( EGLDisplay display, EGLConfig config, @SecureMode int secureMode) { int[] glAttributes; if (secureMode == SECURE_MODE_NONE) { glAttributes = new int[] {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL14.EGL_NONE}; } else { glAttributes = new int[] { EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE, EGL14.EGL_NONE }; } EGLContext context = EGL14.eglCreateContext( display, config, android.opengl.EGL14.EGL_NO_CONTEXT, glAttributes, 0); if (context == null) { throw new GlException("eglCreateContext failed"); } return context; }
Example 5
Source File: EGLSurfaceTexture.java From Telegram with GNU General Public License v2.0 | 6 votes |
private static EGLContext createEGLContext( EGLDisplay display, EGLConfig config, @SecureMode int secureMode) { int[] glAttributes; if (secureMode == SECURE_MODE_NONE) { glAttributes = new int[] {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL14.EGL_NONE}; } else { glAttributes = new int[] { EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE, EGL14.EGL_NONE }; } EGLContext context = EGL14.eglCreateContext( display, config, android.opengl.EGL14.EGL_NO_CONTEXT, glAttributes, 0); if (context == null) { throw new GlException("eglCreateContext failed"); } return context; }
Example 6
Source File: EGLSurfaceTexture.java From MediaSDK with Apache License 2.0 | 4 votes |
private static EGLSurface createEGLSurface( EGLDisplay display, EGLConfig config, EGLContext context, @SecureMode int secureMode) { EGLSurface surface; if (secureMode == SECURE_MODE_SURFACELESS_CONTEXT) { surface = EGL14.EGL_NO_SURFACE; } else { int[] pbufferAttributes; if (secureMode == SECURE_MODE_PROTECTED_PBUFFER) { pbufferAttributes = new int[] { EGL14.EGL_WIDTH, EGL_SURFACE_WIDTH, EGL14.EGL_HEIGHT, EGL_SURFACE_HEIGHT, EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE, EGL14.EGL_NONE }; } else { pbufferAttributes = new int[] { EGL14.EGL_WIDTH, EGL_SURFACE_WIDTH, EGL14.EGL_HEIGHT, EGL_SURFACE_HEIGHT, EGL14.EGL_NONE }; } surface = EGL14.eglCreatePbufferSurface(display, config, pbufferAttributes, /* offset= */ 0); if (surface == null) { throw new GlException("eglCreatePbufferSurface failed"); } } boolean eglMadeCurrent = EGL14.eglMakeCurrent(display, /* draw= */ surface, /* read= */ surface, context); if (!eglMadeCurrent) { throw new GlException("eglMakeCurrent failed"); } return surface; }
Example 7
Source File: EGLSurfaceTexture.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
private static EGLSurface createEGLSurface( EGLDisplay display, EGLConfig config, EGLContext context, @SecureMode int secureMode) { EGLSurface surface; if (secureMode == SECURE_MODE_SURFACELESS_CONTEXT) { surface = EGL14.EGL_NO_SURFACE; } else { int[] pbufferAttributes; if (secureMode == SECURE_MODE_PROTECTED_PBUFFER) { pbufferAttributes = new int[] { EGL14.EGL_WIDTH, EGL_SURFACE_WIDTH, EGL14.EGL_HEIGHT, EGL_SURFACE_HEIGHT, EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE, EGL14.EGL_NONE }; } else { pbufferAttributes = new int[] { EGL14.EGL_WIDTH, EGL_SURFACE_WIDTH, EGL14.EGL_HEIGHT, EGL_SURFACE_HEIGHT, EGL14.EGL_NONE }; } surface = EGL14.eglCreatePbufferSurface(display, config, pbufferAttributes, /* offset= */ 0); if (surface == null) { throw new GlException("eglCreatePbufferSurface failed"); } } boolean eglMadeCurrent = EGL14.eglMakeCurrent(display, /* draw= */ surface, /* read= */ surface, context); if (!eglMadeCurrent) { throw new GlException("eglMakeCurrent failed"); } return surface; }
Example 8
Source File: EGLSurfaceTexture.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
private static EGLSurface createEGLSurface( EGLDisplay display, EGLConfig config, EGLContext context, @SecureMode int secureMode) { EGLSurface surface; if (secureMode == SECURE_MODE_SURFACELESS_CONTEXT) { surface = EGL14.EGL_NO_SURFACE; } else { int[] pbufferAttributes; if (secureMode == SECURE_MODE_PROTECTED_PBUFFER) { pbufferAttributes = new int[] { EGL14.EGL_WIDTH, EGL_SURFACE_WIDTH, EGL14.EGL_HEIGHT, EGL_SURFACE_HEIGHT, EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE, EGL14.EGL_NONE }; } else { pbufferAttributes = new int[] { EGL14.EGL_WIDTH, EGL_SURFACE_WIDTH, EGL14.EGL_HEIGHT, EGL_SURFACE_HEIGHT, EGL14.EGL_NONE }; } surface = EGL14.eglCreatePbufferSurface(display, config, pbufferAttributes, /* offset= */ 0); if (surface == null) { throw new GlException("eglCreatePbufferSurface failed"); } } boolean eglMadeCurrent = EGL14.eglMakeCurrent(display, /* draw= */ surface, /* read= */ surface, context); if (!eglMadeCurrent) { throw new GlException("eglMakeCurrent failed"); } return surface; }
Example 9
Source File: EGLSurfaceTexture.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
private static EGLSurface createEGLSurface( EGLDisplay display, EGLConfig config, EGLContext context, @SecureMode int secureMode) { EGLSurface surface; if (secureMode == SECURE_MODE_SURFACELESS_CONTEXT) { surface = EGL14.EGL_NO_SURFACE; } else { int[] pbufferAttributes; if (secureMode == SECURE_MODE_PROTECTED_PBUFFER) { pbufferAttributes = new int[] { EGL14.EGL_WIDTH, EGL_SURFACE_WIDTH, EGL14.EGL_HEIGHT, EGL_SURFACE_HEIGHT, EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE, EGL14.EGL_NONE }; } else { pbufferAttributes = new int[] { EGL14.EGL_WIDTH, EGL_SURFACE_WIDTH, EGL14.EGL_HEIGHT, EGL_SURFACE_HEIGHT, EGL14.EGL_NONE }; } surface = EGL14.eglCreatePbufferSurface(display, config, pbufferAttributes, /* offset= */ 0); if (surface == null) { throw new GlException("eglCreatePbufferSurface failed"); } } boolean eglMadeCurrent = EGL14.eglMakeCurrent(display, /* draw= */ surface, /* read= */ surface, context); if (!eglMadeCurrent) { throw new GlException("eglMakeCurrent failed"); } return surface; }
Example 10
Source File: EGLSurfaceTexture.java From Telegram with GNU General Public License v2.0 | 4 votes |
private static EGLSurface createEGLSurface( EGLDisplay display, EGLConfig config, EGLContext context, @SecureMode int secureMode) { EGLSurface surface; if (secureMode == SECURE_MODE_SURFACELESS_CONTEXT) { surface = EGL14.EGL_NO_SURFACE; } else { int[] pbufferAttributes; if (secureMode == SECURE_MODE_PROTECTED_PBUFFER) { pbufferAttributes = new int[] { EGL14.EGL_WIDTH, EGL_SURFACE_WIDTH, EGL14.EGL_HEIGHT, EGL_SURFACE_HEIGHT, EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE, EGL14.EGL_NONE }; } else { pbufferAttributes = new int[] { EGL14.EGL_WIDTH, EGL_SURFACE_WIDTH, EGL14.EGL_HEIGHT, EGL_SURFACE_HEIGHT, EGL14.EGL_NONE }; } surface = EGL14.eglCreatePbufferSurface(display, config, pbufferAttributes, /* offset= */ 0); if (surface == null) { throw new GlException("eglCreatePbufferSurface failed"); } } boolean eglMadeCurrent = EGL14.eglMakeCurrent(display, /* draw= */ surface, /* read= */ surface, context); if (!eglMadeCurrent) { throw new GlException("eglMakeCurrent failed"); } return surface; }