1 /* 2 * Copyright (C) 2006 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package javax.microedition.khronos.egl; 18 19 import android.compat.annotation.UnsupportedAppUsage; 20 import android.os.Build; 21 22 public interface EGL10 extends EGL { 23 int EGL_SUCCESS = 0x3000; 24 int EGL_NOT_INITIALIZED = 0x3001; 25 int EGL_BAD_ACCESS = 0x3002; 26 int EGL_BAD_ALLOC = 0x3003; 27 int EGL_BAD_ATTRIBUTE = 0x3004; 28 int EGL_BAD_CONFIG = 0x3005; 29 int EGL_BAD_CONTEXT = 0x3006; 30 int EGL_BAD_CURRENT_SURFACE = 0x3007; 31 int EGL_BAD_DISPLAY = 0x3008; 32 int EGL_BAD_MATCH = 0x3009; 33 int EGL_BAD_NATIVE_PIXMAP = 0x300A; 34 int EGL_BAD_NATIVE_WINDOW = 0x300B; 35 int EGL_BAD_PARAMETER = 0x300C; 36 int EGL_BAD_SURFACE = 0x300D; 37 int EGL_BUFFER_SIZE = 0x3020; 38 int EGL_ALPHA_SIZE = 0x3021; 39 int EGL_BLUE_SIZE = 0x3022; 40 int EGL_GREEN_SIZE = 0x3023; 41 int EGL_RED_SIZE = 0x3024; 42 int EGL_DEPTH_SIZE = 0x3025; 43 int EGL_STENCIL_SIZE = 0x3026; 44 int EGL_CONFIG_CAVEAT = 0x3027; 45 int EGL_CONFIG_ID = 0x3028; 46 int EGL_LEVEL = 0x3029; 47 int EGL_MAX_PBUFFER_HEIGHT = 0x302A; 48 int EGL_MAX_PBUFFER_PIXELS = 0x302B; 49 int EGL_MAX_PBUFFER_WIDTH = 0x302C; 50 int EGL_NATIVE_RENDERABLE = 0x302D; 51 int EGL_NATIVE_VISUAL_ID = 0x302E; 52 int EGL_NATIVE_VISUAL_TYPE = 0x302F; 53 int EGL_SAMPLES = 0x3031; 54 int EGL_SAMPLE_BUFFERS = 0x3032; 55 int EGL_SURFACE_TYPE = 0x3033; 56 int EGL_TRANSPARENT_TYPE = 0x3034; 57 int EGL_TRANSPARENT_BLUE_VALUE = 0x3035; 58 int EGL_TRANSPARENT_GREEN_VALUE = 0x3036; 59 int EGL_TRANSPARENT_RED_VALUE = 0x3037; 60 int EGL_NONE = 0x3038; 61 int EGL_LUMINANCE_SIZE = 0x303D; 62 int EGL_ALPHA_MASK_SIZE = 0x303E; 63 int EGL_COLOR_BUFFER_TYPE = 0x303F; 64 int EGL_RENDERABLE_TYPE = 0x3040; 65 int EGL_SLOW_CONFIG = 0x3050; 66 int EGL_NON_CONFORMANT_CONFIG = 0x3051; 67 int EGL_TRANSPARENT_RGB = 0x3052; 68 int EGL_RGB_BUFFER = 0x308E; 69 int EGL_LUMINANCE_BUFFER = 0x308F; 70 int EGL_VENDOR = 0x3053; 71 int EGL_VERSION = 0x3054; 72 int EGL_EXTENSIONS = 0x3055; 73 int EGL_HEIGHT = 0x3056; 74 int EGL_WIDTH = 0x3057; 75 int EGL_LARGEST_PBUFFER = 0x3058; 76 int EGL_RENDER_BUFFER = 0x3086; 77 int EGL_COLORSPACE = 0x3087; 78 int EGL_ALPHA_FORMAT = 0x3088; 79 int EGL_HORIZONTAL_RESOLUTION = 0x3090; 80 int EGL_VERTICAL_RESOLUTION = 0x3091; 81 int EGL_PIXEL_ASPECT_RATIO = 0x3092; 82 int EGL_SINGLE_BUFFER = 0x3085; 83 int EGL_CORE_NATIVE_ENGINE = 0x305B; 84 int EGL_DRAW = 0x3059; 85 int EGL_READ = 0x305A; 86 87 int EGL_DONT_CARE = -1; 88 89 int EGL_PBUFFER_BIT = 0x01; 90 int EGL_PIXMAP_BIT = 0x02; 91 int EGL_WINDOW_BIT = 0x04; 92 93 Object EGL_DEFAULT_DISPLAY = null; 94 EGLDisplay EGL_NO_DISPLAY = new com.google.android.gles_jni.EGLDisplayImpl(0); 95 EGLContext EGL_NO_CONTEXT = new com.google.android.gles_jni.EGLContextImpl(0); 96 EGLSurface EGL_NO_SURFACE = new com.google.android.gles_jni.EGLSurfaceImpl(0); 97 eglChooseConfig(EGLDisplay display, int[] attrib_list, EGLConfig[] configs, int config_size, int[] num_config)98 boolean eglChooseConfig(EGLDisplay display, int[] attrib_list, EGLConfig[] configs, int config_size, int[] num_config); eglCopyBuffers(EGLDisplay display, EGLSurface surface, Object native_pixmap)99 boolean eglCopyBuffers(EGLDisplay display, EGLSurface surface, Object native_pixmap); eglCreateContext(EGLDisplay display, EGLConfig config, EGLContext share_context, int[] attrib_list)100 EGLContext eglCreateContext(EGLDisplay display, EGLConfig config, EGLContext share_context, int[] attrib_list); eglCreatePbufferSurface(EGLDisplay display, EGLConfig config, int[] attrib_list)101 EGLSurface eglCreatePbufferSurface(EGLDisplay display, EGLConfig config, int[] attrib_list); 102 @Deprecated eglCreatePixmapSurface(EGLDisplay display, EGLConfig config, Object native_pixmap, int[] attrib_list)103 EGLSurface eglCreatePixmapSurface(EGLDisplay display, EGLConfig config, Object native_pixmap, int[] attrib_list); eglCreateWindowSurface(EGLDisplay display, EGLConfig config, Object native_window, int[] attrib_list)104 EGLSurface eglCreateWindowSurface(EGLDisplay display, EGLConfig config, Object native_window, int[] attrib_list); eglDestroyContext(EGLDisplay display, EGLContext context)105 boolean eglDestroyContext(EGLDisplay display, EGLContext context); eglDestroySurface(EGLDisplay display, EGLSurface surface)106 boolean eglDestroySurface(EGLDisplay display, EGLSurface surface); eglGetConfigAttrib(EGLDisplay display, EGLConfig config, int attribute, int[] value)107 boolean eglGetConfigAttrib(EGLDisplay display, EGLConfig config, int attribute, int[] value); eglGetConfigs(EGLDisplay display, EGLConfig[] configs, int config_size, int[] num_config)108 boolean eglGetConfigs(EGLDisplay display, EGLConfig[] configs, int config_size, int[] num_config); eglGetCurrentContext()109 EGLContext eglGetCurrentContext(); eglGetCurrentDisplay()110 EGLDisplay eglGetCurrentDisplay(); eglGetCurrentSurface(int readdraw)111 EGLSurface eglGetCurrentSurface(int readdraw); eglGetDisplay(Object native_display)112 EGLDisplay eglGetDisplay(Object native_display); eglGetError()113 int eglGetError(); eglInitialize(EGLDisplay display, int[] major_minor)114 boolean eglInitialize(EGLDisplay display, int[] major_minor); eglMakeCurrent(EGLDisplay display, EGLSurface draw, EGLSurface read, EGLContext context)115 boolean eglMakeCurrent(EGLDisplay display, EGLSurface draw, EGLSurface read, EGLContext context); eglQueryContext(EGLDisplay display, EGLContext context, int attribute, int[] value)116 boolean eglQueryContext(EGLDisplay display, EGLContext context, int attribute, int[] value); eglQueryString(EGLDisplay display, int name)117 String eglQueryString(EGLDisplay display, int name); eglQuerySurface(EGLDisplay display, EGLSurface surface, int attribute, int[] value)118 boolean eglQuerySurface(EGLDisplay display, EGLSurface surface, int attribute, int[] value); 119 /** @hide **/ 120 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) eglReleaseThread()121 boolean eglReleaseThread(); eglSwapBuffers(EGLDisplay display, EGLSurface surface)122 boolean eglSwapBuffers(EGLDisplay display, EGLSurface surface); eglTerminate(EGLDisplay display)123 boolean eglTerminate(EGLDisplay display); eglWaitGL()124 boolean eglWaitGL(); eglWaitNative(int engine, Object bindTarget)125 boolean eglWaitNative(int engine, Object bindTarget); 126 } 127