| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 1 | /* |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 2 | ** Copyright 2012, 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 | // This source file is automatically generated |
| 18 | |
| 19 | package android.opengl; |
| 20 | |
| Artur Satayev | 53ada2a | 2019-12-10 17:47:56 +0000 | [diff] [blame] | 21 | import android.compat.annotation.UnsupportedAppUsage; |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 22 | import android.graphics.SurfaceTexture; |
| Mathew Inwood | 5d123b6 | 2020-11-04 09:29:36 +0000 | [diff] [blame] | 23 | import android.os.Build; |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 24 | import android.view.Surface; |
| Austin Wang | a63a2c0 | 2019-12-19 06:38:19 +0000 | [diff] [blame] | 25 | import android.view.SurfaceHolder; |
| Artur Satayev | 53ada2a | 2019-12-10 17:47:56 +0000 | [diff] [blame] | 26 | import android.view.SurfaceView; |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 27 | |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 28 | /** |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 29 | * EGL 1.4 |
| 30 | * |
| 31 | */ |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 32 | public class EGL14 { |
| 33 | |
| 34 | public static final int EGL_DEFAULT_DISPLAY = 0; |
| 35 | public static EGLContext EGL_NO_CONTEXT = null; |
| 36 | public static EGLDisplay EGL_NO_DISPLAY = null; |
| 37 | public static EGLSurface EGL_NO_SURFACE = null; |
| 38 | |
| 39 | public static final int EGL_FALSE = 0; |
| 40 | public static final int EGL_TRUE = 1; |
| 41 | public static final int EGL_SUCCESS = 0x3000; |
| 42 | public static final int EGL_NOT_INITIALIZED = 0x3001; |
| 43 | public static final int EGL_BAD_ACCESS = 0x3002; |
| 44 | public static final int EGL_BAD_ALLOC = 0x3003; |
| 45 | public static final int EGL_BAD_ATTRIBUTE = 0x3004; |
| 46 | public static final int EGL_BAD_CONFIG = 0x3005; |
| 47 | public static final int EGL_BAD_CONTEXT = 0x3006; |
| 48 | public static final int EGL_BAD_CURRENT_SURFACE = 0x3007; |
| 49 | public static final int EGL_BAD_DISPLAY = 0x3008; |
| 50 | public static final int EGL_BAD_MATCH = 0x3009; |
| 51 | public static final int EGL_BAD_NATIVE_PIXMAP = 0x300A; |
| 52 | public static final int EGL_BAD_NATIVE_WINDOW = 0x300B; |
| 53 | public static final int EGL_BAD_PARAMETER = 0x300C; |
| 54 | public static final int EGL_BAD_SURFACE = 0x300D; |
| 55 | public static final int EGL_CONTEXT_LOST = 0x300E; |
| 56 | public static final int EGL_BUFFER_SIZE = 0x3020; |
| 57 | public static final int EGL_ALPHA_SIZE = 0x3021; |
| 58 | public static final int EGL_BLUE_SIZE = 0x3022; |
| 59 | public static final int EGL_GREEN_SIZE = 0x3023; |
| 60 | public static final int EGL_RED_SIZE = 0x3024; |
| 61 | public static final int EGL_DEPTH_SIZE = 0x3025; |
| 62 | public static final int EGL_STENCIL_SIZE = 0x3026; |
| 63 | public static final int EGL_CONFIG_CAVEAT = 0x3027; |
| 64 | public static final int EGL_CONFIG_ID = 0x3028; |
| 65 | public static final int EGL_LEVEL = 0x3029; |
| 66 | public static final int EGL_MAX_PBUFFER_HEIGHT = 0x302A; |
| 67 | public static final int EGL_MAX_PBUFFER_PIXELS = 0x302B; |
| 68 | public static final int EGL_MAX_PBUFFER_WIDTH = 0x302C; |
| 69 | public static final int EGL_NATIVE_RENDERABLE = 0x302D; |
| 70 | public static final int EGL_NATIVE_VISUAL_ID = 0x302E; |
| 71 | public static final int EGL_NATIVE_VISUAL_TYPE = 0x302F; |
| 72 | public static final int EGL_SAMPLES = 0x3031; |
| 73 | public static final int EGL_SAMPLE_BUFFERS = 0x3032; |
| 74 | public static final int EGL_SURFACE_TYPE = 0x3033; |
| 75 | public static final int EGL_TRANSPARENT_TYPE = 0x3034; |
| 76 | public static final int EGL_TRANSPARENT_BLUE_VALUE = 0x3035; |
| 77 | public static final int EGL_TRANSPARENT_GREEN_VALUE = 0x3036; |
| 78 | public static final int EGL_TRANSPARENT_RED_VALUE = 0x3037; |
| 79 | public static final int EGL_NONE = 0x3038; |
| 80 | public static final int EGL_BIND_TO_TEXTURE_RGB = 0x3039; |
| 81 | public static final int EGL_BIND_TO_TEXTURE_RGBA = 0x303A; |
| 82 | public static final int EGL_MIN_SWAP_INTERVAL = 0x303B; |
| 83 | public static final int EGL_MAX_SWAP_INTERVAL = 0x303C; |
| 84 | public static final int EGL_LUMINANCE_SIZE = 0x303D; |
| 85 | public static final int EGL_ALPHA_MASK_SIZE = 0x303E; |
| 86 | public static final int EGL_COLOR_BUFFER_TYPE = 0x303F; |
| 87 | public static final int EGL_RENDERABLE_TYPE = 0x3040; |
| 88 | public static final int EGL_MATCH_NATIVE_PIXMAP = 0x3041; |
| 89 | public static final int EGL_CONFORMANT = 0x3042; |
| 90 | public static final int EGL_SLOW_CONFIG = 0x3050; |
| 91 | public static final int EGL_NON_CONFORMANT_CONFIG = 0x3051; |
| 92 | public static final int EGL_TRANSPARENT_RGB = 0x3052; |
| 93 | public static final int EGL_RGB_BUFFER = 0x308E; |
| 94 | public static final int EGL_LUMINANCE_BUFFER = 0x308F; |
| 95 | public static final int EGL_NO_TEXTURE = 0x305C; |
| 96 | public static final int EGL_TEXTURE_RGB = 0x305D; |
| 97 | public static final int EGL_TEXTURE_RGBA = 0x305E; |
| 98 | public static final int EGL_TEXTURE_2D = 0x305F; |
| 99 | public static final int EGL_PBUFFER_BIT = 0x0001; |
| 100 | public static final int EGL_PIXMAP_BIT = 0x0002; |
| 101 | public static final int EGL_WINDOW_BIT = 0x0004; |
| 102 | public static final int EGL_VG_COLORSPACE_LINEAR_BIT = 0x0020; |
| 103 | public static final int EGL_VG_ALPHA_FORMAT_PRE_BIT = 0x0040; |
| 104 | public static final int EGL_MULTISAMPLE_RESOLVE_BOX_BIT = 0x0200; |
| 105 | public static final int EGL_SWAP_BEHAVIOR_PRESERVED_BIT = 0x0400; |
| 106 | public static final int EGL_OPENGL_ES_BIT = 0x0001; |
| 107 | public static final int EGL_OPENVG_BIT = 0x0002; |
| 108 | public static final int EGL_OPENGL_ES2_BIT = 0x0004; |
| 109 | public static final int EGL_OPENGL_BIT = 0x0008; |
| 110 | public static final int EGL_VENDOR = 0x3053; |
| 111 | public static final int EGL_VERSION = 0x3054; |
| 112 | public static final int EGL_EXTENSIONS = 0x3055; |
| 113 | public static final int EGL_CLIENT_APIS = 0x308D; |
| 114 | public static final int EGL_HEIGHT = 0x3056; |
| 115 | public static final int EGL_WIDTH = 0x3057; |
| 116 | public static final int EGL_LARGEST_PBUFFER = 0x3058; |
| 117 | public static final int EGL_TEXTURE_FORMAT = 0x3080; |
| 118 | public static final int EGL_TEXTURE_TARGET = 0x3081; |
| 119 | public static final int EGL_MIPMAP_TEXTURE = 0x3082; |
| 120 | public static final int EGL_MIPMAP_LEVEL = 0x3083; |
| 121 | public static final int EGL_RENDER_BUFFER = 0x3086; |
| 122 | public static final int EGL_VG_COLORSPACE = 0x3087; |
| 123 | public static final int EGL_VG_ALPHA_FORMAT = 0x3088; |
| 124 | public static final int EGL_HORIZONTAL_RESOLUTION = 0x3090; |
| 125 | public static final int EGL_VERTICAL_RESOLUTION = 0x3091; |
| 126 | public static final int EGL_PIXEL_ASPECT_RATIO = 0x3092; |
| 127 | public static final int EGL_SWAP_BEHAVIOR = 0x3093; |
| 128 | public static final int EGL_MULTISAMPLE_RESOLVE = 0x3099; |
| 129 | public static final int EGL_BACK_BUFFER = 0x3084; |
| 130 | public static final int EGL_SINGLE_BUFFER = 0x3085; |
| 131 | public static final int EGL_VG_COLORSPACE_sRGB = 0x3089; |
| 132 | public static final int EGL_VG_COLORSPACE_LINEAR = 0x308A; |
| 133 | public static final int EGL_VG_ALPHA_FORMAT_NONPRE = 0x308B; |
| 134 | public static final int EGL_VG_ALPHA_FORMAT_PRE = 0x308C; |
| 135 | public static final int EGL_DISPLAY_SCALING = 10000; |
| 136 | public static final int EGL_BUFFER_PRESERVED = 0x3094; |
| 137 | public static final int EGL_BUFFER_DESTROYED = 0x3095; |
| 138 | public static final int EGL_OPENVG_IMAGE = 0x3096; |
| 139 | public static final int EGL_CONTEXT_CLIENT_TYPE = 0x3097; |
| 140 | public static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098; |
| 141 | public static final int EGL_MULTISAMPLE_RESOLVE_DEFAULT = 0x309A; |
| 142 | public static final int EGL_MULTISAMPLE_RESOLVE_BOX = 0x309B; |
| 143 | public static final int EGL_OPENGL_ES_API = 0x30A0; |
| 144 | public static final int EGL_OPENVG_API = 0x30A1; |
| 145 | public static final int EGL_OPENGL_API = 0x30A2; |
| 146 | public static final int EGL_DRAW = 0x3059; |
| 147 | public static final int EGL_READ = 0x305A; |
| 148 | public static final int EGL_CORE_NATIVE_ENGINE = 0x305B; |
| 149 | |
| 150 | native private static void _nativeClassInit(); |
| 151 | static { |
| 152 | _nativeClassInit(); |
| 153 | } |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 154 | // C function EGLint eglGetError ( void ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 155 | |
| 156 | public static native int eglGetError( |
| 157 | ); |
| 158 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 159 | // C function EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 160 | |
| 161 | public static native EGLDisplay eglGetDisplay( |
| 162 | int display_id |
| 163 | ); |
| Ashok Bhat | 64d38d9 | 2014-02-26 10:00:48 +0000 | [diff] [blame] | 164 | |
| Ashok Bhat | 84bbeb9 | 2014-02-24 10:06:55 +0000 | [diff] [blame] | 165 | /** |
| 166 | * {@hide} |
| 167 | */ |
| Mathew Inwood | 5d123b6 | 2020-11-04 09:29:36 +0000 | [diff] [blame] | 168 | @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) |
| Ashok Bhat | 84bbeb9 | 2014-02-24 10:06:55 +0000 | [diff] [blame] | 169 | public static native EGLDisplay eglGetDisplay( |
| 170 | long display_id |
| 171 | ); |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 172 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 173 | // C function EGLBoolean eglInitialize ( EGLDisplay dpy, EGLint *major, EGLint *minor ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 174 | |
| 175 | public static native boolean eglInitialize( |
| 176 | EGLDisplay dpy, |
| 177 | int[] major, |
| 178 | int majorOffset, |
| 179 | int[] minor, |
| 180 | int minorOffset |
| 181 | ); |
| 182 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 183 | // C function EGLBoolean eglTerminate ( EGLDisplay dpy ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 184 | |
| 185 | public static native boolean eglTerminate( |
| 186 | EGLDisplay dpy |
| 187 | ); |
| 188 | |
| 189 | // C function const char * eglQueryString ( EGLDisplay dpy, EGLint name ) |
| 190 | |
| 191 | public static native String eglQueryString( |
| 192 | EGLDisplay dpy, |
| 193 | int name |
| 194 | ); |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 195 | // C function EGLBoolean eglGetConfigs ( EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 196 | |
| 197 | public static native boolean eglGetConfigs( |
| 198 | EGLDisplay dpy, |
| 199 | EGLConfig[] configs, |
| 200 | int configsOffset, |
| 201 | int config_size, |
| 202 | int[] num_config, |
| 203 | int num_configOffset |
| 204 | ); |
| 205 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 206 | // C function EGLBoolean eglChooseConfig ( EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 207 | |
| 208 | public static native boolean eglChooseConfig( |
| 209 | EGLDisplay dpy, |
| 210 | int[] attrib_list, |
| 211 | int attrib_listOffset, |
| 212 | EGLConfig[] configs, |
| 213 | int configsOffset, |
| 214 | int config_size, |
| 215 | int[] num_config, |
| 216 | int num_configOffset |
| 217 | ); |
| 218 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 219 | // C function EGLBoolean eglGetConfigAttrib ( EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 220 | |
| 221 | public static native boolean eglGetConfigAttrib( |
| 222 | EGLDisplay dpy, |
| 223 | EGLConfig config, |
| 224 | int attribute, |
| 225 | int[] value, |
| 226 | int offset |
| 227 | ); |
| 228 | |
| 229 | // C function EGLSurface eglCreateWindowSurface ( EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list ) |
| 230 | |
| 231 | private static native EGLSurface _eglCreateWindowSurface( |
| 232 | EGLDisplay dpy, |
| 233 | EGLConfig config, |
| 234 | Object win, |
| 235 | int[] attrib_list, |
| 236 | int offset |
| 237 | ); |
| 238 | |
| 239 | private static native EGLSurface _eglCreateWindowSurfaceTexture( |
| 240 | EGLDisplay dpy, |
| 241 | EGLConfig config, |
| 242 | Object win, |
| 243 | int[] attrib_list, |
| 244 | int offset |
| 245 | ); |
| 246 | |
| 247 | public static EGLSurface eglCreateWindowSurface(EGLDisplay dpy, |
| 248 | EGLConfig config, |
| 249 | Object win, |
| 250 | int[] attrib_list, |
| 251 | int offset |
| 252 | ){ |
| 253 | Surface sur = null; |
| 254 | if (win instanceof SurfaceView) { |
| 255 | SurfaceView surfaceView = (SurfaceView)win; |
| 256 | sur = surfaceView.getHolder().getSurface(); |
| 257 | } else if (win instanceof SurfaceHolder) { |
| 258 | SurfaceHolder holder = (SurfaceHolder)win; |
| 259 | sur = holder.getSurface(); |
| Jeff Brown | 1296c63 | 2012-08-08 01:47:28 -0700 | [diff] [blame] | 260 | } else if (win instanceof Surface) { |
| 261 | sur = (Surface) win; |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 262 | } |
| 263 | |
| 264 | EGLSurface surface; |
| 265 | if (sur != null) { |
| 266 | surface = _eglCreateWindowSurface(dpy, config, sur, attrib_list, offset); |
| 267 | } else if (win instanceof SurfaceTexture) { |
| 268 | surface = _eglCreateWindowSurfaceTexture(dpy, config, |
| 269 | win, attrib_list, offset); |
| 270 | } else { |
| 271 | throw new java.lang.UnsupportedOperationException( |
| 272 | "eglCreateWindowSurface() can only be called with an instance of " + |
| Jeff Brown | 1296c63 | 2012-08-08 01:47:28 -0700 | [diff] [blame] | 273 | "Surface, SurfaceView, SurfaceTexture or SurfaceHolder at the moment, " + |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 274 | "this will be fixed later."); |
| 275 | } |
| 276 | |
| 277 | return surface; |
| 278 | } |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 279 | // C function EGLSurface eglCreatePbufferSurface ( EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 280 | |
| 281 | public static native EGLSurface eglCreatePbufferSurface( |
| 282 | EGLDisplay dpy, |
| 283 | EGLConfig config, |
| 284 | int[] attrib_list, |
| 285 | int offset |
| 286 | ); |
| 287 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 288 | // C function EGLSurface eglCreatePixmapSurface ( EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 289 | |
| Romain Guy | 1f071dd | 2016-11-30 10:20:29 -0800 | [diff] [blame] | 290 | @Deprecated |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 291 | public static native EGLSurface eglCreatePixmapSurface( |
| 292 | EGLDisplay dpy, |
| 293 | EGLConfig config, |
| 294 | int pixmap, |
| 295 | int[] attrib_list, |
| 296 | int offset |
| 297 | ); |
| 298 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 299 | // C function EGLBoolean eglDestroySurface ( EGLDisplay dpy, EGLSurface surface ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 300 | |
| 301 | public static native boolean eglDestroySurface( |
| 302 | EGLDisplay dpy, |
| 303 | EGLSurface surface |
| 304 | ); |
| 305 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 306 | // C function EGLBoolean eglQuerySurface ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 307 | |
| 308 | public static native boolean eglQuerySurface( |
| 309 | EGLDisplay dpy, |
| 310 | EGLSurface surface, |
| 311 | int attribute, |
| 312 | int[] value, |
| 313 | int offset |
| 314 | ); |
| 315 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 316 | // C function EGLBoolean eglBindAPI ( EGLenum api ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 317 | |
| 318 | public static native boolean eglBindAPI( |
| 319 | int api |
| 320 | ); |
| 321 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 322 | // C function EGLenum eglQueryAPI ( void ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 323 | |
| 324 | public static native int eglQueryAPI( |
| 325 | ); |
| 326 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 327 | // C function EGLBoolean eglWaitClient ( void ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 328 | |
| 329 | public static native boolean eglWaitClient( |
| 330 | ); |
| 331 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 332 | // C function EGLBoolean eglReleaseThread ( void ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 333 | |
| 334 | public static native boolean eglReleaseThread( |
| 335 | ); |
| 336 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 337 | // C function EGLSurface eglCreatePbufferFromClientBuffer ( EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list ) |
| Ashok Bhat | 84bbeb9 | 2014-02-24 10:06:55 +0000 | [diff] [blame] | 338 | // TODO Deprecate the below method |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 339 | public static native EGLSurface eglCreatePbufferFromClientBuffer( |
| 340 | EGLDisplay dpy, |
| 341 | int buftype, |
| 342 | int buffer, |
| 343 | EGLConfig config, |
| 344 | int[] attrib_list, |
| 345 | int offset |
| 346 | ); |
| Ashok Bhat | 84bbeb9 | 2014-02-24 10:06:55 +0000 | [diff] [blame] | 347 | // TODO Unhide the below method |
| 348 | /** |
| 349 | * {@hide} |
| 350 | */ |
| 351 | public static native EGLSurface eglCreatePbufferFromClientBuffer( |
| 352 | EGLDisplay dpy, |
| 353 | int buftype, |
| 354 | long buffer, |
| 355 | EGLConfig config, |
| 356 | int[] attrib_list, |
| 357 | int offset |
| 358 | ); |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 359 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 360 | // C function EGLBoolean eglSurfaceAttrib ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 361 | |
| 362 | public static native boolean eglSurfaceAttrib( |
| 363 | EGLDisplay dpy, |
| 364 | EGLSurface surface, |
| 365 | int attribute, |
| 366 | int value |
| 367 | ); |
| 368 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 369 | // C function EGLBoolean eglBindTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 370 | |
| 371 | public static native boolean eglBindTexImage( |
| 372 | EGLDisplay dpy, |
| 373 | EGLSurface surface, |
| 374 | int buffer |
| 375 | ); |
| 376 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 377 | // C function EGLBoolean eglReleaseTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 378 | |
| 379 | public static native boolean eglReleaseTexImage( |
| 380 | EGLDisplay dpy, |
| 381 | EGLSurface surface, |
| 382 | int buffer |
| 383 | ); |
| 384 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 385 | // C function EGLBoolean eglSwapInterval ( EGLDisplay dpy, EGLint interval ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 386 | |
| 387 | public static native boolean eglSwapInterval( |
| 388 | EGLDisplay dpy, |
| 389 | int interval |
| 390 | ); |
| 391 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 392 | // C function EGLContext eglCreateContext ( EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 393 | |
| 394 | public static native EGLContext eglCreateContext( |
| 395 | EGLDisplay dpy, |
| 396 | EGLConfig config, |
| 397 | EGLContext share_context, |
| 398 | int[] attrib_list, |
| 399 | int offset |
| 400 | ); |
| 401 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 402 | // C function EGLBoolean eglDestroyContext ( EGLDisplay dpy, EGLContext ctx ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 403 | |
| 404 | public static native boolean eglDestroyContext( |
| 405 | EGLDisplay dpy, |
| 406 | EGLContext ctx |
| 407 | ); |
| 408 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 409 | // C function EGLBoolean eglMakeCurrent ( EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 410 | |
| 411 | public static native boolean eglMakeCurrent( |
| 412 | EGLDisplay dpy, |
| 413 | EGLSurface draw, |
| 414 | EGLSurface read, |
| 415 | EGLContext ctx |
| 416 | ); |
| 417 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 418 | // C function EGLContext eglGetCurrentContext ( void ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 419 | |
| 420 | public static native EGLContext eglGetCurrentContext( |
| 421 | ); |
| 422 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 423 | // C function EGLSurface eglGetCurrentSurface ( EGLint readdraw ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 424 | |
| 425 | public static native EGLSurface eglGetCurrentSurface( |
| 426 | int readdraw |
| 427 | ); |
| 428 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 429 | // C function EGLDisplay eglGetCurrentDisplay ( void ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 430 | |
| 431 | public static native EGLDisplay eglGetCurrentDisplay( |
| 432 | ); |
| 433 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 434 | // C function EGLBoolean eglQueryContext ( EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 435 | |
| 436 | public static native boolean eglQueryContext( |
| 437 | EGLDisplay dpy, |
| 438 | EGLContext ctx, |
| 439 | int attribute, |
| 440 | int[] value, |
| 441 | int offset |
| 442 | ); |
| 443 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 444 | // C function EGLBoolean eglWaitGL ( void ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 445 | |
| 446 | public static native boolean eglWaitGL( |
| 447 | ); |
| 448 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 449 | // C function EGLBoolean eglWaitNative ( EGLint engine ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 450 | |
| 451 | public static native boolean eglWaitNative( |
| 452 | int engine |
| 453 | ); |
| 454 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 455 | // C function EGLBoolean eglSwapBuffers ( EGLDisplay dpy, EGLSurface surface ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 456 | |
| 457 | public static native boolean eglSwapBuffers( |
| 458 | EGLDisplay dpy, |
| 459 | EGLSurface surface |
| 460 | ); |
| 461 | |
| Thomas Tafertshofer | 9b18b51 | 2012-07-12 15:58:07 -0700 | [diff] [blame] | 462 | // C function EGLBoolean eglCopyBuffers ( EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target ) |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 463 | |
| 464 | public static native boolean eglCopyBuffers( |
| 465 | EGLDisplay dpy, |
| 466 | EGLSurface surface, |
| 467 | int target |
| 468 | ); |
| 469 | |
| Thomas Tafertshofer | 6b1e838 | 2012-07-03 13:37:35 -0700 | [diff] [blame] | 470 | } |