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