Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1 | /* |
| 2 | ** |
| 3 | ** Copyright 2009, The Android Open Source Project |
| 4 | ** |
Elliott Hughes | 24ce5fb | 2011-04-08 20:01:01 -0700 | [diff] [blame] | 5 | ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | ** you may not use this file except in compliance with the License. |
| 7 | ** You may obtain a copy of the License at |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 8 | ** |
Elliott Hughes | 24ce5fb | 2011-04-08 20:01:01 -0700 | [diff] [blame] | 9 | ** http://www.apache.org/licenses/LICENSE-2.0 |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 10 | ** |
Elliott Hughes | 24ce5fb | 2011-04-08 20:01:01 -0700 | [diff] [blame] | 11 | ** Unless required by applicable law or agreed to in writing, software |
| 12 | ** distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | ** See the License for the specific language governing permissions and |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 15 | ** limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | // This source file is automatically generated |
| 19 | |
Elliott Hughes | 24ce5fb | 2011-04-08 20:01:01 -0700 | [diff] [blame] | 20 | #include "jni.h" |
| 21 | #include "JNIHelp.h" |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 22 | #include <android_runtime/AndroidRuntime.h> |
| 23 | #include <utils/misc.h> |
| 24 | |
| 25 | #include <assert.h> |
| 26 | #include <GLES/gl.h> |
Jack Palevich | be509c9 | 2009-05-07 09:52:14 -0700 | [diff] [blame] | 27 | #include <GLES/glext.h> |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 28 | |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 29 | /* special calls implemented in Android's GLES wrapper used to more |
| 30 | * efficiently bound-check passed arrays */ |
| 31 | extern "C" { |
| 32 | GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, GLsizei stride, |
| 33 | const GLvoid *ptr, GLsizei count); |
| 34 | GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, GLsizei stride, |
| 35 | const GLvoid *ptr, GLsizei count); |
| 36 | } |
| 37 | |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 38 | static int initialized = 0; |
| 39 | |
| 40 | static jclass nioAccessClass; |
| 41 | static jclass bufferClass; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 42 | static jmethodID getBasePointerID; |
| 43 | static jmethodID getBaseArrayID; |
| 44 | static jmethodID getBaseArrayOffsetID; |
| 45 | static jfieldID positionID; |
| 46 | static jfieldID limitID; |
| 47 | static jfieldID elementSizeShiftID; |
| 48 | |
| 49 | /* Cache method IDs each time the class is loaded. */ |
| 50 | |
| 51 | static void |
Elliott Hughes | 24ce5fb | 2011-04-08 20:01:01 -0700 | [diff] [blame] | 52 | nativeClassInit(JNIEnv *_env, jclass glImplClass) |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 53 | { |
| 54 | jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); |
| 55 | nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); |
| 56 | |
| 57 | jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); |
| 58 | bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); |
| 59 | |
| 60 | getBasePointerID = _env->GetStaticMethodID(nioAccessClass, |
| 61 | "getBasePointer", "(Ljava/nio/Buffer;)J"); |
| 62 | getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, |
| 63 | "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); |
| 64 | getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, |
| 65 | "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); |
| 66 | |
| 67 | positionID = _env->GetFieldID(bufferClass, "position", "I"); |
| 68 | limitID = _env->GetFieldID(bufferClass, "limit", "I"); |
| 69 | elementSizeShiftID = |
| 70 | _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); |
| 71 | } |
| 72 | |
| 73 | |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 74 | static void * |
| 75 | getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining) |
| 76 | { |
| 77 | jint position; |
| 78 | jint limit; |
| 79 | jint elementSizeShift; |
| 80 | jlong pointer; |
| 81 | jint offset; |
| 82 | void *data; |
| 83 | |
| 84 | position = _env->GetIntField(buffer, positionID); |
| 85 | limit = _env->GetIntField(buffer, limitID); |
| 86 | elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); |
| 87 | *remaining = (limit - position) << elementSizeShift; |
| 88 | pointer = _env->CallStaticLongMethod(nioAccessClass, |
| 89 | getBasePointerID, buffer); |
| 90 | if (pointer != 0L) { |
| 91 | *array = NULL; |
| 92 | return (void *) (jint) pointer; |
| 93 | } |
Elliott Hughes | 24ce5fb | 2011-04-08 20:01:01 -0700 | [diff] [blame] | 94 | |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 95 | *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, |
| 96 | getBaseArrayID, buffer); |
| 97 | offset = _env->CallStaticIntMethod(nioAccessClass, |
| 98 | getBaseArrayOffsetID, buffer); |
| 99 | data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0); |
Elliott Hughes | 24ce5fb | 2011-04-08 20:01:01 -0700 | [diff] [blame] | 100 | |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 101 | return (void *) ((char *) data + offset); |
| 102 | } |
| 103 | |
| 104 | |
| 105 | static void |
| 106 | releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) |
| 107 | { |
| 108 | _env->ReleasePrimitiveArrayCritical(array, data, |
| 109 | commit ? 0 : JNI_ABORT); |
| 110 | } |
| 111 | |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 112 | static void * |
| 113 | getDirectBufferPointer(JNIEnv *_env, jobject buffer) { |
| 114 | char* buf = (char*) _env->GetDirectBufferAddress(buffer); |
| 115 | if (buf) { |
| 116 | jint position = _env->GetIntField(buffer, positionID); |
| 117 | jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); |
| 118 | buf += position << elementSizeShift; |
| 119 | } else { |
Elliott Hughes | 24ce5fb | 2011-04-08 20:01:01 -0700 | [diff] [blame] | 120 | jniThrowException(_env, "java/lang/IllegalArgumentException", |
| 121 | "Must use a native order direct Buffer"); |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 122 | } |
| 123 | return (void*) buf; |
| 124 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 125 | // -------------------------------------------------------------------------- |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 126 | /* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */ |
| 127 | static void |
| 128 | android_glBlendEquationSeparateOES__II |
| 129 | (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 130 | glBlendEquationSeparateOES( |
| 131 | (GLenum)modeRGB, |
| 132 | (GLenum)modeAlpha |
| 133 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 134 | } |
| 135 | |
| 136 | /* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */ |
| 137 | static void |
| 138 | android_glBlendFuncSeparateOES__IIII |
| 139 | (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 140 | glBlendFuncSeparateOES( |
| 141 | (GLenum)srcRGB, |
| 142 | (GLenum)dstRGB, |
| 143 | (GLenum)srcAlpha, |
| 144 | (GLenum)dstAlpha |
| 145 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | /* void glBlendEquationOES ( GLenum mode ) */ |
| 149 | static void |
| 150 | android_glBlendEquationOES__I |
| 151 | (JNIEnv *_env, jobject _this, jint mode) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 152 | glBlendEquationOES( |
| 153 | (GLenum)mode |
| 154 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 155 | } |
| 156 | |
| 157 | /* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */ |
| 158 | static void |
| 159 | android_glDrawTexsOES__SSSSS |
| 160 | (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) { |
| 161 | glDrawTexsOES( |
| 162 | (GLshort)x, |
| 163 | (GLshort)y, |
| 164 | (GLshort)z, |
| 165 | (GLshort)width, |
| 166 | (GLshort)height |
| 167 | ); |
| 168 | } |
| 169 | |
| 170 | /* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */ |
| 171 | static void |
| 172 | android_glDrawTexiOES__IIIII |
| 173 | (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) { |
| 174 | glDrawTexiOES( |
| 175 | (GLint)x, |
| 176 | (GLint)y, |
| 177 | (GLint)z, |
| 178 | (GLint)width, |
| 179 | (GLint)height |
| 180 | ); |
| 181 | } |
| 182 | |
| 183 | /* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */ |
| 184 | static void |
| 185 | android_glDrawTexxOES__IIIII |
| 186 | (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) { |
| 187 | glDrawTexxOES( |
| 188 | (GLfixed)x, |
| 189 | (GLfixed)y, |
| 190 | (GLfixed)z, |
| 191 | (GLfixed)width, |
| 192 | (GLfixed)height |
| 193 | ); |
| 194 | } |
| 195 | |
| 196 | /* void glDrawTexsvOES ( const GLshort *coords ) */ |
| 197 | static void |
| 198 | android_glDrawTexsvOES___3SI |
| 199 | (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 200 | jint _exception = 0; |
| 201 | const char * _exceptionType; |
| 202 | const char * _exceptionMessage; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 203 | GLshort *coords_base = (GLshort *) 0; |
| 204 | jint _remaining; |
| 205 | GLshort *coords = (GLshort *) 0; |
| 206 | |
| 207 | if (!coords_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 208 | _exception = 1; |
| 209 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 210 | _exceptionMessage = "coords == null"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 211 | goto exit; |
| 212 | } |
| 213 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 214 | _exception = 1; |
| 215 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 216 | _exceptionMessage = "offset < 0"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 217 | goto exit; |
| 218 | } |
| 219 | _remaining = _env->GetArrayLength(coords_ref) - offset; |
| 220 | if (_remaining < 5) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 221 | _exception = 1; |
| 222 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 223 | _exceptionMessage = "length - offset < 5 < needed"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 224 | goto exit; |
| 225 | } |
| 226 | coords_base = (GLshort *) |
| 227 | _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0); |
| 228 | coords = coords_base + offset; |
| 229 | |
| 230 | glDrawTexsvOES( |
| 231 | (GLshort *)coords |
| 232 | ); |
| 233 | |
| 234 | exit: |
| 235 | if (coords_base) { |
| 236 | _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, |
| 237 | JNI_ABORT); |
| 238 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 239 | if (_exception) { |
| 240 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 241 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 242 | } |
| 243 | |
| 244 | /* void glDrawTexsvOES ( const GLshort *coords ) */ |
| 245 | static void |
| 246 | android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 |
| 247 | (JNIEnv *_env, jobject _this, jobject coords_buf) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 248 | jint _exception = 0; |
| 249 | const char * _exceptionType; |
| 250 | const char * _exceptionMessage; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 251 | jarray _array = (jarray) 0; |
| 252 | jint _remaining; |
| 253 | GLshort *coords = (GLshort *) 0; |
| 254 | |
| 255 | coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining); |
| 256 | if (_remaining < 5) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 257 | _exception = 1; |
| 258 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 259 | _exceptionMessage = "remaining() < 5 < needed"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 260 | goto exit; |
| 261 | } |
| 262 | glDrawTexsvOES( |
| 263 | (GLshort *)coords |
| 264 | ); |
| 265 | |
| 266 | exit: |
| 267 | if (_array) { |
| 268 | releasePointer(_env, _array, coords, JNI_FALSE); |
| 269 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 270 | if (_exception) { |
| 271 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 272 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 273 | } |
| 274 | |
| 275 | /* void glDrawTexivOES ( const GLint *coords ) */ |
| 276 | static void |
| 277 | android_glDrawTexivOES___3II |
| 278 | (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 279 | jint _exception = 0; |
| 280 | const char * _exceptionType; |
| 281 | const char * _exceptionMessage; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 282 | GLint *coords_base = (GLint *) 0; |
| 283 | jint _remaining; |
| 284 | GLint *coords = (GLint *) 0; |
| 285 | |
| 286 | if (!coords_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 287 | _exception = 1; |
| 288 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 289 | _exceptionMessage = "coords == null"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 290 | goto exit; |
| 291 | } |
| 292 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 293 | _exception = 1; |
| 294 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 295 | _exceptionMessage = "offset < 0"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 296 | goto exit; |
| 297 | } |
| 298 | _remaining = _env->GetArrayLength(coords_ref) - offset; |
| 299 | if (_remaining < 5) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 300 | _exception = 1; |
| 301 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 302 | _exceptionMessage = "length - offset < 5 < needed"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 303 | goto exit; |
| 304 | } |
| 305 | coords_base = (GLint *) |
| 306 | _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0); |
| 307 | coords = coords_base + offset; |
| 308 | |
| 309 | glDrawTexivOES( |
| 310 | (GLint *)coords |
| 311 | ); |
| 312 | |
| 313 | exit: |
| 314 | if (coords_base) { |
| 315 | _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, |
| 316 | JNI_ABORT); |
| 317 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 318 | if (_exception) { |
| 319 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 320 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 321 | } |
| 322 | |
| 323 | /* void glDrawTexivOES ( const GLint *coords ) */ |
| 324 | static void |
| 325 | android_glDrawTexivOES__Ljava_nio_IntBuffer_2 |
| 326 | (JNIEnv *_env, jobject _this, jobject coords_buf) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 327 | jint _exception = 0; |
| 328 | const char * _exceptionType; |
| 329 | const char * _exceptionMessage; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 330 | jarray _array = (jarray) 0; |
| 331 | jint _remaining; |
| 332 | GLint *coords = (GLint *) 0; |
| 333 | |
| 334 | coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining); |
| 335 | if (_remaining < 5) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 336 | _exception = 1; |
| 337 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 338 | _exceptionMessage = "remaining() < 5 < needed"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 339 | goto exit; |
| 340 | } |
| 341 | glDrawTexivOES( |
| 342 | (GLint *)coords |
| 343 | ); |
| 344 | |
| 345 | exit: |
| 346 | if (_array) { |
| 347 | releasePointer(_env, _array, coords, JNI_FALSE); |
| 348 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 349 | if (_exception) { |
| 350 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 351 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 352 | } |
| 353 | |
| 354 | /* void glDrawTexxvOES ( const GLfixed *coords ) */ |
| 355 | static void |
| 356 | android_glDrawTexxvOES___3II |
| 357 | (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 358 | jint _exception = 0; |
| 359 | const char * _exceptionType; |
| 360 | const char * _exceptionMessage; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 361 | GLfixed *coords_base = (GLfixed *) 0; |
| 362 | jint _remaining; |
| 363 | GLfixed *coords = (GLfixed *) 0; |
| 364 | |
| 365 | if (!coords_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 366 | _exception = 1; |
| 367 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 368 | _exceptionMessage = "coords == null"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 369 | goto exit; |
| 370 | } |
| 371 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 372 | _exception = 1; |
| 373 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 374 | _exceptionMessage = "offset < 0"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 375 | goto exit; |
| 376 | } |
| 377 | _remaining = _env->GetArrayLength(coords_ref) - offset; |
| 378 | if (_remaining < 5) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 379 | _exception = 1; |
| 380 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 381 | _exceptionMessage = "length - offset < 5 < needed"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 382 | goto exit; |
| 383 | } |
| 384 | coords_base = (GLfixed *) |
| 385 | _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0); |
| 386 | coords = coords_base + offset; |
| 387 | |
| 388 | glDrawTexxvOES( |
| 389 | (GLfixed *)coords |
| 390 | ); |
| 391 | |
| 392 | exit: |
| 393 | if (coords_base) { |
| 394 | _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, |
| 395 | JNI_ABORT); |
| 396 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 397 | if (_exception) { |
| 398 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 399 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 400 | } |
| 401 | |
| 402 | /* void glDrawTexxvOES ( const GLfixed *coords ) */ |
| 403 | static void |
| 404 | android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 |
| 405 | (JNIEnv *_env, jobject _this, jobject coords_buf) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 406 | jint _exception = 0; |
| 407 | const char * _exceptionType; |
| 408 | const char * _exceptionMessage; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 409 | jarray _array = (jarray) 0; |
| 410 | jint _remaining; |
| 411 | GLfixed *coords = (GLfixed *) 0; |
| 412 | |
| 413 | coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining); |
| 414 | if (_remaining < 5) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 415 | _exception = 1; |
| 416 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 417 | _exceptionMessage = "remaining() < 5 < needed"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 418 | goto exit; |
| 419 | } |
| 420 | glDrawTexxvOES( |
| 421 | (GLfixed *)coords |
| 422 | ); |
| 423 | |
| 424 | exit: |
| 425 | if (_array) { |
| 426 | releasePointer(_env, _array, coords, JNI_FALSE); |
| 427 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 428 | if (_exception) { |
| 429 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 430 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 431 | } |
| 432 | |
| 433 | /* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */ |
| 434 | static void |
| 435 | android_glDrawTexfOES__FFFFF |
| 436 | (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) { |
| 437 | glDrawTexfOES( |
| 438 | (GLfloat)x, |
| 439 | (GLfloat)y, |
| 440 | (GLfloat)z, |
| 441 | (GLfloat)width, |
| 442 | (GLfloat)height |
| 443 | ); |
| 444 | } |
| 445 | |
| 446 | /* void glDrawTexfvOES ( const GLfloat *coords ) */ |
| 447 | static void |
| 448 | android_glDrawTexfvOES___3FI |
| 449 | (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 450 | jint _exception = 0; |
| 451 | const char * _exceptionType; |
| 452 | const char * _exceptionMessage; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 453 | GLfloat *coords_base = (GLfloat *) 0; |
| 454 | jint _remaining; |
| 455 | GLfloat *coords = (GLfloat *) 0; |
| 456 | |
| 457 | if (!coords_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 458 | _exception = 1; |
| 459 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 460 | _exceptionMessage = "coords == null"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 461 | goto exit; |
| 462 | } |
| 463 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 464 | _exception = 1; |
| 465 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 466 | _exceptionMessage = "offset < 0"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 467 | goto exit; |
| 468 | } |
| 469 | _remaining = _env->GetArrayLength(coords_ref) - offset; |
| 470 | if (_remaining < 5) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 471 | _exception = 1; |
| 472 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 473 | _exceptionMessage = "length - offset < 5 < needed"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 474 | goto exit; |
| 475 | } |
| 476 | coords_base = (GLfloat *) |
| 477 | _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0); |
| 478 | coords = coords_base + offset; |
| 479 | |
| 480 | glDrawTexfvOES( |
| 481 | (GLfloat *)coords |
| 482 | ); |
| 483 | |
| 484 | exit: |
| 485 | if (coords_base) { |
| 486 | _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, |
| 487 | JNI_ABORT); |
| 488 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 489 | if (_exception) { |
| 490 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 491 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 492 | } |
| 493 | |
| 494 | /* void glDrawTexfvOES ( const GLfloat *coords ) */ |
| 495 | static void |
| 496 | android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 |
| 497 | (JNIEnv *_env, jobject _this, jobject coords_buf) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 498 | jint _exception = 0; |
| 499 | const char * _exceptionType; |
| 500 | const char * _exceptionMessage; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 501 | jarray _array = (jarray) 0; |
| 502 | jint _remaining; |
| 503 | GLfloat *coords = (GLfloat *) 0; |
| 504 | |
| 505 | coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining); |
| 506 | if (_remaining < 5) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 507 | _exception = 1; |
| 508 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 509 | _exceptionMessage = "remaining() < 5 < needed"; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 510 | goto exit; |
| 511 | } |
| 512 | glDrawTexfvOES( |
| 513 | (GLfloat *)coords |
| 514 | ); |
| 515 | |
| 516 | exit: |
| 517 | if (_array) { |
| 518 | releasePointer(_env, _array, coords, JNI_FALSE); |
| 519 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 520 | if (_exception) { |
| 521 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 522 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 523 | } |
| 524 | |
| 525 | /* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */ |
| 526 | static void |
| 527 | android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 |
| 528 | (JNIEnv *_env, jobject _this, jint target, jobject image_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 529 | jarray _array = (jarray) 0; |
| 530 | jint _remaining; |
| 531 | GLeglImageOES image = (GLeglImageOES) 0; |
| 532 | |
| 533 | image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining); |
| 534 | glEGLImageTargetTexture2DOES( |
| 535 | (GLenum)target, |
| 536 | (GLeglImageOES)image |
| 537 | ); |
| 538 | if (_array) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 539 | releasePointer(_env, _array, image, JNI_TRUE); |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 540 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 541 | } |
| 542 | |
| 543 | /* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */ |
| 544 | static void |
| 545 | android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 |
| 546 | (JNIEnv *_env, jobject _this, jint target, jobject image_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 547 | jarray _array = (jarray) 0; |
| 548 | jint _remaining; |
| 549 | GLeglImageOES image = (GLeglImageOES) 0; |
| 550 | |
| 551 | image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining); |
| 552 | glEGLImageTargetRenderbufferStorageOES( |
| 553 | (GLenum)target, |
| 554 | (GLeglImageOES)image |
| 555 | ); |
| 556 | if (_array) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 557 | releasePointer(_env, _array, image, JNI_TRUE); |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 558 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 559 | } |
| 560 | |
| 561 | /* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */ |
| 562 | static void |
| 563 | android_glAlphaFuncxOES__II |
| 564 | (JNIEnv *_env, jobject _this, jint func, jint ref) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 565 | glAlphaFuncxOES( |
| 566 | (GLenum)func, |
| 567 | (GLclampx)ref |
| 568 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 569 | } |
| 570 | |
| 571 | /* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */ |
| 572 | static void |
| 573 | android_glClearColorxOES__IIII |
| 574 | (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 575 | glClearColorxOES( |
| 576 | (GLclampx)red, |
| 577 | (GLclampx)green, |
| 578 | (GLclampx)blue, |
| 579 | (GLclampx)alpha |
| 580 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 581 | } |
| 582 | |
| 583 | /* void glClearDepthxOES ( GLclampx depth ) */ |
| 584 | static void |
| 585 | android_glClearDepthxOES__I |
| 586 | (JNIEnv *_env, jobject _this, jint depth) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 587 | glClearDepthxOES( |
| 588 | (GLclampx)depth |
| 589 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 590 | } |
| 591 | |
| 592 | /* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */ |
| 593 | static void |
| 594 | android_glClipPlanexOES__I_3II |
| 595 | (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 596 | jint _exception = 0; |
| 597 | const char * _exceptionType; |
| 598 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 599 | GLfixed *equation_base = (GLfixed *) 0; |
| 600 | jint _remaining; |
| 601 | GLfixed *equation = (GLfixed *) 0; |
| 602 | |
| 603 | if (!equation_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 604 | _exception = 1; |
| 605 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 606 | _exceptionMessage = "equation == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 607 | goto exit; |
| 608 | } |
| 609 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 610 | _exception = 1; |
| 611 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 612 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 613 | goto exit; |
| 614 | } |
| 615 | _remaining = _env->GetArrayLength(equation_ref) - offset; |
| 616 | equation_base = (GLfixed *) |
| 617 | _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0); |
| 618 | equation = equation_base + offset; |
| 619 | |
| 620 | glClipPlanexOES( |
| 621 | (GLenum)plane, |
| 622 | (GLfixed *)equation |
| 623 | ); |
| 624 | |
| 625 | exit: |
| 626 | if (equation_base) { |
| 627 | _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base, |
| 628 | JNI_ABORT); |
| 629 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 630 | if (_exception) { |
| 631 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 632 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 633 | } |
| 634 | |
| 635 | /* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */ |
| 636 | static void |
| 637 | android_glClipPlanexOES__ILjava_nio_IntBuffer_2 |
| 638 | (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 639 | jarray _array = (jarray) 0; |
| 640 | jint _remaining; |
| 641 | GLfixed *equation = (GLfixed *) 0; |
| 642 | |
| 643 | equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining); |
| 644 | glClipPlanexOES( |
| 645 | (GLenum)plane, |
| 646 | (GLfixed *)equation |
| 647 | ); |
| 648 | if (_array) { |
| 649 | releasePointer(_env, _array, equation, JNI_FALSE); |
| 650 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 651 | } |
| 652 | |
| 653 | /* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */ |
| 654 | static void |
| 655 | android_glColor4xOES__IIII |
| 656 | (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 657 | glColor4xOES( |
| 658 | (GLfixed)red, |
| 659 | (GLfixed)green, |
| 660 | (GLfixed)blue, |
| 661 | (GLfixed)alpha |
| 662 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 663 | } |
| 664 | |
| 665 | /* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */ |
| 666 | static void |
| 667 | android_glDepthRangexOES__II |
| 668 | (JNIEnv *_env, jobject _this, jint zNear, jint zFar) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 669 | glDepthRangexOES( |
| 670 | (GLclampx)zNear, |
| 671 | (GLclampx)zFar |
| 672 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 673 | } |
| 674 | |
| 675 | /* void glFogxOES ( GLenum pname, GLfixed param ) */ |
| 676 | static void |
| 677 | android_glFogxOES__II |
| 678 | (JNIEnv *_env, jobject _this, jint pname, jint param) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 679 | glFogxOES( |
| 680 | (GLenum)pname, |
| 681 | (GLfixed)param |
| 682 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 683 | } |
| 684 | |
| 685 | /* void glFogxvOES ( GLenum pname, const GLfixed *params ) */ |
| 686 | static void |
| 687 | android_glFogxvOES__I_3II |
| 688 | (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 689 | jint _exception = 0; |
| 690 | const char * _exceptionType; |
| 691 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 692 | GLfixed *params_base = (GLfixed *) 0; |
| 693 | jint _remaining; |
| 694 | GLfixed *params = (GLfixed *) 0; |
| 695 | |
| 696 | if (!params_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 697 | _exception = 1; |
| 698 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 699 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 700 | goto exit; |
| 701 | } |
| 702 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 703 | _exception = 1; |
| 704 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 705 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 706 | goto exit; |
| 707 | } |
| 708 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 709 | params_base = (GLfixed *) |
| 710 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 711 | params = params_base + offset; |
| 712 | |
| 713 | glFogxvOES( |
| 714 | (GLenum)pname, |
| 715 | (GLfixed *)params |
| 716 | ); |
| 717 | |
| 718 | exit: |
| 719 | if (params_base) { |
| 720 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 721 | JNI_ABORT); |
| 722 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 723 | if (_exception) { |
| 724 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 725 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 726 | } |
| 727 | |
| 728 | /* void glFogxvOES ( GLenum pname, const GLfixed *params ) */ |
| 729 | static void |
| 730 | android_glFogxvOES__ILjava_nio_IntBuffer_2 |
| 731 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 732 | jarray _array = (jarray) 0; |
| 733 | jint _remaining; |
| 734 | GLfixed *params = (GLfixed *) 0; |
| 735 | |
| 736 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 737 | glFogxvOES( |
| 738 | (GLenum)pname, |
| 739 | (GLfixed *)params |
| 740 | ); |
| 741 | if (_array) { |
| 742 | releasePointer(_env, _array, params, JNI_FALSE); |
| 743 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 744 | } |
| 745 | |
| 746 | /* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */ |
| 747 | static void |
| 748 | android_glFrustumxOES__IIIIII |
| 749 | (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 750 | glFrustumxOES( |
| 751 | (GLfixed)left, |
| 752 | (GLfixed)right, |
| 753 | (GLfixed)bottom, |
| 754 | (GLfixed)top, |
| 755 | (GLfixed)zNear, |
| 756 | (GLfixed)zFar |
| 757 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 758 | } |
| 759 | |
| 760 | /* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */ |
| 761 | static void |
| 762 | android_glGetClipPlanexOES__I_3II |
| 763 | (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 764 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 765 | const char * _exceptionType; |
| 766 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 767 | GLfixed *eqn_base = (GLfixed *) 0; |
| 768 | jint _remaining; |
| 769 | GLfixed *eqn = (GLfixed *) 0; |
| 770 | |
| 771 | if (!eqn_ref) { |
| 772 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 773 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 774 | _exceptionMessage = "eqn == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 775 | goto exit; |
| 776 | } |
| 777 | if (offset < 0) { |
| 778 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 779 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 780 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 781 | goto exit; |
| 782 | } |
| 783 | _remaining = _env->GetArrayLength(eqn_ref) - offset; |
| 784 | if (_remaining < 4) { |
| 785 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 786 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 787 | _exceptionMessage = "length - offset < 4 < needed"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 788 | goto exit; |
| 789 | } |
| 790 | eqn_base = (GLfixed *) |
| 791 | _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0); |
| 792 | eqn = eqn_base + offset; |
| 793 | |
| 794 | glGetClipPlanexOES( |
| 795 | (GLenum)pname, |
| 796 | (GLfixed *)eqn |
| 797 | ); |
| 798 | |
| 799 | exit: |
| 800 | if (eqn_base) { |
| 801 | _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base, |
| 802 | _exception ? JNI_ABORT: 0); |
| 803 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 804 | if (_exception) { |
| 805 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 806 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 807 | } |
| 808 | |
| 809 | /* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */ |
| 810 | static void |
| 811 | android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 |
| 812 | (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 813 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 814 | const char * _exceptionType; |
| 815 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 816 | jarray _array = (jarray) 0; |
| 817 | jint _remaining; |
| 818 | GLfixed *eqn = (GLfixed *) 0; |
| 819 | |
| 820 | eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining); |
| 821 | if (_remaining < 4) { |
| 822 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 823 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 824 | _exceptionMessage = "remaining() < 4 < needed"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 825 | goto exit; |
| 826 | } |
| 827 | glGetClipPlanexOES( |
| 828 | (GLenum)pname, |
| 829 | (GLfixed *)eqn |
| 830 | ); |
| 831 | |
| 832 | exit: |
| 833 | if (_array) { |
| 834 | releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE); |
| 835 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 836 | if (_exception) { |
| 837 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 838 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 839 | } |
| 840 | |
| 841 | /* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */ |
| 842 | static void |
| 843 | android_glGetFixedvOES__I_3II |
| 844 | (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 845 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 846 | const char * _exceptionType; |
| 847 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 848 | GLfixed *params_base = (GLfixed *) 0; |
| 849 | jint _remaining; |
| 850 | GLfixed *params = (GLfixed *) 0; |
| 851 | |
| 852 | if (!params_ref) { |
| 853 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 854 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 855 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 856 | goto exit; |
| 857 | } |
| 858 | if (offset < 0) { |
| 859 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 860 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 861 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 862 | goto exit; |
| 863 | } |
| 864 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 865 | params_base = (GLfixed *) |
| 866 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 867 | params = params_base + offset; |
| 868 | |
| 869 | glGetFixedvOES( |
| 870 | (GLenum)pname, |
| 871 | (GLfixed *)params |
| 872 | ); |
| 873 | |
| 874 | exit: |
| 875 | if (params_base) { |
| 876 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 877 | _exception ? JNI_ABORT: 0); |
| 878 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 879 | if (_exception) { |
| 880 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 881 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 882 | } |
| 883 | |
| 884 | /* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */ |
| 885 | static void |
| 886 | android_glGetFixedvOES__ILjava_nio_IntBuffer_2 |
| 887 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 888 | jarray _array = (jarray) 0; |
| 889 | jint _remaining; |
| 890 | GLfixed *params = (GLfixed *) 0; |
| 891 | |
| 892 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 893 | glGetFixedvOES( |
| 894 | (GLenum)pname, |
| 895 | (GLfixed *)params |
| 896 | ); |
| 897 | if (_array) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 898 | releasePointer(_env, _array, params, JNI_TRUE); |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 899 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 900 | } |
| 901 | |
| 902 | /* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */ |
| 903 | static void |
| 904 | android_glGetLightxvOES__II_3II |
| 905 | (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 906 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 907 | const char * _exceptionType; |
| 908 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 909 | GLfixed *params_base = (GLfixed *) 0; |
| 910 | jint _remaining; |
| 911 | GLfixed *params = (GLfixed *) 0; |
| 912 | |
| 913 | if (!params_ref) { |
| 914 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 915 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 916 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 917 | goto exit; |
| 918 | } |
| 919 | if (offset < 0) { |
| 920 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 921 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 922 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 923 | goto exit; |
| 924 | } |
| 925 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 926 | params_base = (GLfixed *) |
| 927 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 928 | params = params_base + offset; |
| 929 | |
| 930 | glGetLightxvOES( |
| 931 | (GLenum)light, |
| 932 | (GLenum)pname, |
| 933 | (GLfixed *)params |
| 934 | ); |
| 935 | |
| 936 | exit: |
| 937 | if (params_base) { |
| 938 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 939 | _exception ? JNI_ABORT: 0); |
| 940 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 941 | if (_exception) { |
| 942 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 943 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 944 | } |
| 945 | |
| 946 | /* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */ |
| 947 | static void |
| 948 | android_glGetLightxvOES__IILjava_nio_IntBuffer_2 |
| 949 | (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 950 | jarray _array = (jarray) 0; |
| 951 | jint _remaining; |
| 952 | GLfixed *params = (GLfixed *) 0; |
| 953 | |
| 954 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 955 | glGetLightxvOES( |
| 956 | (GLenum)light, |
| 957 | (GLenum)pname, |
| 958 | (GLfixed *)params |
| 959 | ); |
| 960 | if (_array) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 961 | releasePointer(_env, _array, params, JNI_TRUE); |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 962 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 963 | } |
| 964 | |
| 965 | /* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */ |
| 966 | static void |
| 967 | android_glGetMaterialxvOES__II_3II |
| 968 | (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 969 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 970 | const char * _exceptionType; |
| 971 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 972 | GLfixed *params_base = (GLfixed *) 0; |
| 973 | jint _remaining; |
| 974 | GLfixed *params = (GLfixed *) 0; |
| 975 | |
| 976 | if (!params_ref) { |
| 977 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 978 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 979 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 980 | goto exit; |
| 981 | } |
| 982 | if (offset < 0) { |
| 983 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 984 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 985 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 986 | goto exit; |
| 987 | } |
| 988 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 989 | params_base = (GLfixed *) |
| 990 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 991 | params = params_base + offset; |
| 992 | |
| 993 | glGetMaterialxvOES( |
| 994 | (GLenum)face, |
| 995 | (GLenum)pname, |
| 996 | (GLfixed *)params |
| 997 | ); |
| 998 | |
| 999 | exit: |
| 1000 | if (params_base) { |
| 1001 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1002 | _exception ? JNI_ABORT: 0); |
| 1003 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1004 | if (_exception) { |
| 1005 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1006 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1007 | } |
| 1008 | |
| 1009 | /* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */ |
| 1010 | static void |
| 1011 | android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 |
| 1012 | (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1013 | jarray _array = (jarray) 0; |
| 1014 | jint _remaining; |
| 1015 | GLfixed *params = (GLfixed *) 0; |
| 1016 | |
| 1017 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1018 | glGetMaterialxvOES( |
| 1019 | (GLenum)face, |
| 1020 | (GLenum)pname, |
| 1021 | (GLfixed *)params |
| 1022 | ); |
| 1023 | if (_array) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1024 | releasePointer(_env, _array, params, JNI_TRUE); |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1025 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1026 | } |
| 1027 | |
| 1028 | /* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */ |
| 1029 | static void |
| 1030 | android_glGetTexEnvxvOES__II_3II |
| 1031 | (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1032 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1033 | const char * _exceptionType; |
| 1034 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1035 | GLfixed *params_base = (GLfixed *) 0; |
| 1036 | jint _remaining; |
| 1037 | GLfixed *params = (GLfixed *) 0; |
| 1038 | |
| 1039 | if (!params_ref) { |
| 1040 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1041 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1042 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1043 | goto exit; |
| 1044 | } |
| 1045 | if (offset < 0) { |
| 1046 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1047 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1048 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1049 | goto exit; |
| 1050 | } |
| 1051 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1052 | params_base = (GLfixed *) |
| 1053 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1054 | params = params_base + offset; |
| 1055 | |
| 1056 | glGetTexEnvxvOES( |
| 1057 | (GLenum)env, |
| 1058 | (GLenum)pname, |
| 1059 | (GLfixed *)params |
| 1060 | ); |
| 1061 | |
| 1062 | exit: |
| 1063 | if (params_base) { |
| 1064 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1065 | _exception ? JNI_ABORT: 0); |
| 1066 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1067 | if (_exception) { |
| 1068 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1069 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1070 | } |
| 1071 | |
| 1072 | /* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */ |
| 1073 | static void |
| 1074 | android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 |
| 1075 | (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1076 | jarray _array = (jarray) 0; |
| 1077 | jint _remaining; |
| 1078 | GLfixed *params = (GLfixed *) 0; |
| 1079 | |
| 1080 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1081 | glGetTexEnvxvOES( |
| 1082 | (GLenum)env, |
| 1083 | (GLenum)pname, |
| 1084 | (GLfixed *)params |
| 1085 | ); |
| 1086 | if (_array) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1087 | releasePointer(_env, _array, params, JNI_TRUE); |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1088 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1089 | } |
| 1090 | |
| 1091 | /* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */ |
| 1092 | static void |
| 1093 | android_glGetTexParameterxvOES__II_3II |
| 1094 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1095 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1096 | const char * _exceptionType; |
| 1097 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1098 | GLfixed *params_base = (GLfixed *) 0; |
| 1099 | jint _remaining; |
| 1100 | GLfixed *params = (GLfixed *) 0; |
| 1101 | |
| 1102 | if (!params_ref) { |
| 1103 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1104 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1105 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1106 | goto exit; |
| 1107 | } |
| 1108 | if (offset < 0) { |
| 1109 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1110 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1111 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1112 | goto exit; |
| 1113 | } |
| 1114 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1115 | params_base = (GLfixed *) |
| 1116 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1117 | params = params_base + offset; |
| 1118 | |
| 1119 | glGetTexParameterxvOES( |
| 1120 | (GLenum)target, |
| 1121 | (GLenum)pname, |
| 1122 | (GLfixed *)params |
| 1123 | ); |
| 1124 | |
| 1125 | exit: |
| 1126 | if (params_base) { |
| 1127 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1128 | _exception ? JNI_ABORT: 0); |
| 1129 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1130 | if (_exception) { |
| 1131 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1132 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1133 | } |
| 1134 | |
| 1135 | /* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */ |
| 1136 | static void |
| 1137 | android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 |
| 1138 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1139 | jarray _array = (jarray) 0; |
| 1140 | jint _remaining; |
| 1141 | GLfixed *params = (GLfixed *) 0; |
| 1142 | |
| 1143 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1144 | glGetTexParameterxvOES( |
| 1145 | (GLenum)target, |
| 1146 | (GLenum)pname, |
| 1147 | (GLfixed *)params |
| 1148 | ); |
| 1149 | if (_array) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1150 | releasePointer(_env, _array, params, JNI_TRUE); |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1151 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1152 | } |
| 1153 | |
| 1154 | /* void glLightModelxOES ( GLenum pname, GLfixed param ) */ |
| 1155 | static void |
| 1156 | android_glLightModelxOES__II |
| 1157 | (JNIEnv *_env, jobject _this, jint pname, jint param) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1158 | glLightModelxOES( |
| 1159 | (GLenum)pname, |
| 1160 | (GLfixed)param |
| 1161 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1162 | } |
| 1163 | |
| 1164 | /* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */ |
| 1165 | static void |
| 1166 | android_glLightModelxvOES__I_3II |
| 1167 | (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1168 | jint _exception = 0; |
| 1169 | const char * _exceptionType; |
| 1170 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1171 | GLfixed *params_base = (GLfixed *) 0; |
| 1172 | jint _remaining; |
| 1173 | GLfixed *params = (GLfixed *) 0; |
| 1174 | |
| 1175 | if (!params_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1176 | _exception = 1; |
| 1177 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1178 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1179 | goto exit; |
| 1180 | } |
| 1181 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1182 | _exception = 1; |
| 1183 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1184 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1185 | goto exit; |
| 1186 | } |
| 1187 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1188 | params_base = (GLfixed *) |
| 1189 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1190 | params = params_base + offset; |
| 1191 | |
| 1192 | glLightModelxvOES( |
| 1193 | (GLenum)pname, |
| 1194 | (GLfixed *)params |
| 1195 | ); |
| 1196 | |
| 1197 | exit: |
| 1198 | if (params_base) { |
| 1199 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1200 | JNI_ABORT); |
| 1201 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1202 | if (_exception) { |
| 1203 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1204 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1205 | } |
| 1206 | |
| 1207 | /* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */ |
| 1208 | static void |
| 1209 | android_glLightModelxvOES__ILjava_nio_IntBuffer_2 |
| 1210 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1211 | jarray _array = (jarray) 0; |
| 1212 | jint _remaining; |
| 1213 | GLfixed *params = (GLfixed *) 0; |
| 1214 | |
| 1215 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1216 | glLightModelxvOES( |
| 1217 | (GLenum)pname, |
| 1218 | (GLfixed *)params |
| 1219 | ); |
| 1220 | if (_array) { |
| 1221 | releasePointer(_env, _array, params, JNI_FALSE); |
| 1222 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1223 | } |
| 1224 | |
| 1225 | /* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */ |
| 1226 | static void |
| 1227 | android_glLightxOES__III |
| 1228 | (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1229 | glLightxOES( |
| 1230 | (GLenum)light, |
| 1231 | (GLenum)pname, |
| 1232 | (GLfixed)param |
| 1233 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1234 | } |
| 1235 | |
| 1236 | /* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */ |
| 1237 | static void |
| 1238 | android_glLightxvOES__II_3II |
| 1239 | (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1240 | jint _exception = 0; |
| 1241 | const char * _exceptionType; |
| 1242 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1243 | GLfixed *params_base = (GLfixed *) 0; |
| 1244 | jint _remaining; |
| 1245 | GLfixed *params = (GLfixed *) 0; |
| 1246 | |
| 1247 | if (!params_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1248 | _exception = 1; |
| 1249 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1250 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1251 | goto exit; |
| 1252 | } |
| 1253 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1254 | _exception = 1; |
| 1255 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1256 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1257 | goto exit; |
| 1258 | } |
| 1259 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1260 | params_base = (GLfixed *) |
| 1261 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1262 | params = params_base + offset; |
| 1263 | |
| 1264 | glLightxvOES( |
| 1265 | (GLenum)light, |
| 1266 | (GLenum)pname, |
| 1267 | (GLfixed *)params |
| 1268 | ); |
| 1269 | |
| 1270 | exit: |
| 1271 | if (params_base) { |
| 1272 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1273 | JNI_ABORT); |
| 1274 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1275 | if (_exception) { |
| 1276 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1277 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1278 | } |
| 1279 | |
| 1280 | /* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */ |
| 1281 | static void |
| 1282 | android_glLightxvOES__IILjava_nio_IntBuffer_2 |
| 1283 | (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1284 | jarray _array = (jarray) 0; |
| 1285 | jint _remaining; |
| 1286 | GLfixed *params = (GLfixed *) 0; |
| 1287 | |
| 1288 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1289 | glLightxvOES( |
| 1290 | (GLenum)light, |
| 1291 | (GLenum)pname, |
| 1292 | (GLfixed *)params |
| 1293 | ); |
| 1294 | if (_array) { |
| 1295 | releasePointer(_env, _array, params, JNI_FALSE); |
| 1296 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1297 | } |
| 1298 | |
| 1299 | /* void glLineWidthxOES ( GLfixed width ) */ |
| 1300 | static void |
| 1301 | android_glLineWidthxOES__I |
| 1302 | (JNIEnv *_env, jobject _this, jint width) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1303 | glLineWidthxOES( |
| 1304 | (GLfixed)width |
| 1305 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1306 | } |
| 1307 | |
| 1308 | /* void glLoadMatrixxOES ( const GLfixed *m ) */ |
| 1309 | static void |
| 1310 | android_glLoadMatrixxOES___3II |
| 1311 | (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1312 | jint _exception = 0; |
| 1313 | const char * _exceptionType; |
| 1314 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1315 | GLfixed *m_base = (GLfixed *) 0; |
| 1316 | jint _remaining; |
| 1317 | GLfixed *m = (GLfixed *) 0; |
| 1318 | |
| 1319 | if (!m_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1320 | _exception = 1; |
| 1321 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1322 | _exceptionMessage = "m == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1323 | goto exit; |
| 1324 | } |
| 1325 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1326 | _exception = 1; |
| 1327 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1328 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1329 | goto exit; |
| 1330 | } |
| 1331 | _remaining = _env->GetArrayLength(m_ref) - offset; |
| 1332 | m_base = (GLfixed *) |
| 1333 | _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0); |
| 1334 | m = m_base + offset; |
| 1335 | |
| 1336 | glLoadMatrixxOES( |
| 1337 | (GLfixed *)m |
| 1338 | ); |
| 1339 | |
| 1340 | exit: |
| 1341 | if (m_base) { |
| 1342 | _env->ReleasePrimitiveArrayCritical(m_ref, m_base, |
| 1343 | JNI_ABORT); |
| 1344 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1345 | if (_exception) { |
| 1346 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1347 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1348 | } |
| 1349 | |
| 1350 | /* void glLoadMatrixxOES ( const GLfixed *m ) */ |
| 1351 | static void |
| 1352 | android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 |
| 1353 | (JNIEnv *_env, jobject _this, jobject m_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1354 | jarray _array = (jarray) 0; |
| 1355 | jint _remaining; |
| 1356 | GLfixed *m = (GLfixed *) 0; |
| 1357 | |
| 1358 | m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining); |
| 1359 | glLoadMatrixxOES( |
| 1360 | (GLfixed *)m |
| 1361 | ); |
| 1362 | if (_array) { |
| 1363 | releasePointer(_env, _array, m, JNI_FALSE); |
| 1364 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1365 | } |
| 1366 | |
| 1367 | /* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */ |
| 1368 | static void |
| 1369 | android_glMaterialxOES__III |
| 1370 | (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1371 | glMaterialxOES( |
| 1372 | (GLenum)face, |
| 1373 | (GLenum)pname, |
| 1374 | (GLfixed)param |
| 1375 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1376 | } |
| 1377 | |
| 1378 | /* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */ |
| 1379 | static void |
| 1380 | android_glMaterialxvOES__II_3II |
| 1381 | (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1382 | jint _exception = 0; |
| 1383 | const char * _exceptionType; |
| 1384 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1385 | GLfixed *params_base = (GLfixed *) 0; |
| 1386 | jint _remaining; |
| 1387 | GLfixed *params = (GLfixed *) 0; |
| 1388 | |
| 1389 | if (!params_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1390 | _exception = 1; |
| 1391 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1392 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1393 | goto exit; |
| 1394 | } |
| 1395 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1396 | _exception = 1; |
| 1397 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1398 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1399 | goto exit; |
| 1400 | } |
| 1401 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1402 | params_base = (GLfixed *) |
| 1403 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1404 | params = params_base + offset; |
| 1405 | |
| 1406 | glMaterialxvOES( |
| 1407 | (GLenum)face, |
| 1408 | (GLenum)pname, |
| 1409 | (GLfixed *)params |
| 1410 | ); |
| 1411 | |
| 1412 | exit: |
| 1413 | if (params_base) { |
| 1414 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1415 | JNI_ABORT); |
| 1416 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1417 | if (_exception) { |
| 1418 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1419 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1420 | } |
| 1421 | |
| 1422 | /* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */ |
| 1423 | static void |
| 1424 | android_glMaterialxvOES__IILjava_nio_IntBuffer_2 |
| 1425 | (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1426 | jarray _array = (jarray) 0; |
| 1427 | jint _remaining; |
| 1428 | GLfixed *params = (GLfixed *) 0; |
| 1429 | |
| 1430 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1431 | glMaterialxvOES( |
| 1432 | (GLenum)face, |
| 1433 | (GLenum)pname, |
| 1434 | (GLfixed *)params |
| 1435 | ); |
| 1436 | if (_array) { |
| 1437 | releasePointer(_env, _array, params, JNI_FALSE); |
| 1438 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1439 | } |
| 1440 | |
| 1441 | /* void glMultMatrixxOES ( const GLfixed *m ) */ |
| 1442 | static void |
| 1443 | android_glMultMatrixxOES___3II |
| 1444 | (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1445 | jint _exception = 0; |
| 1446 | const char * _exceptionType; |
| 1447 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1448 | GLfixed *m_base = (GLfixed *) 0; |
| 1449 | jint _remaining; |
| 1450 | GLfixed *m = (GLfixed *) 0; |
| 1451 | |
| 1452 | if (!m_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1453 | _exception = 1; |
| 1454 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1455 | _exceptionMessage = "m == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1456 | goto exit; |
| 1457 | } |
| 1458 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1459 | _exception = 1; |
| 1460 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1461 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1462 | goto exit; |
| 1463 | } |
| 1464 | _remaining = _env->GetArrayLength(m_ref) - offset; |
| 1465 | m_base = (GLfixed *) |
| 1466 | _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0); |
| 1467 | m = m_base + offset; |
| 1468 | |
| 1469 | glMultMatrixxOES( |
| 1470 | (GLfixed *)m |
| 1471 | ); |
| 1472 | |
| 1473 | exit: |
| 1474 | if (m_base) { |
| 1475 | _env->ReleasePrimitiveArrayCritical(m_ref, m_base, |
| 1476 | JNI_ABORT); |
| 1477 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1478 | if (_exception) { |
| 1479 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1480 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1481 | } |
| 1482 | |
| 1483 | /* void glMultMatrixxOES ( const GLfixed *m ) */ |
| 1484 | static void |
| 1485 | android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 |
| 1486 | (JNIEnv *_env, jobject _this, jobject m_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1487 | jarray _array = (jarray) 0; |
| 1488 | jint _remaining; |
| 1489 | GLfixed *m = (GLfixed *) 0; |
| 1490 | |
| 1491 | m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining); |
| 1492 | glMultMatrixxOES( |
| 1493 | (GLfixed *)m |
| 1494 | ); |
| 1495 | if (_array) { |
| 1496 | releasePointer(_env, _array, m, JNI_FALSE); |
| 1497 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1498 | } |
| 1499 | |
| 1500 | /* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */ |
| 1501 | static void |
| 1502 | android_glMultiTexCoord4xOES__IIIII |
| 1503 | (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1504 | glMultiTexCoord4xOES( |
| 1505 | (GLenum)target, |
| 1506 | (GLfixed)s, |
| 1507 | (GLfixed)t, |
| 1508 | (GLfixed)r, |
| 1509 | (GLfixed)q |
| 1510 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1511 | } |
| 1512 | |
| 1513 | /* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */ |
| 1514 | static void |
| 1515 | android_glNormal3xOES__III |
| 1516 | (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1517 | glNormal3xOES( |
| 1518 | (GLfixed)nx, |
| 1519 | (GLfixed)ny, |
| 1520 | (GLfixed)nz |
| 1521 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1522 | } |
| 1523 | |
| 1524 | /* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */ |
| 1525 | static void |
| 1526 | android_glOrthoxOES__IIIIII |
| 1527 | (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1528 | glOrthoxOES( |
| 1529 | (GLfixed)left, |
| 1530 | (GLfixed)right, |
| 1531 | (GLfixed)bottom, |
| 1532 | (GLfixed)top, |
| 1533 | (GLfixed)zNear, |
| 1534 | (GLfixed)zFar |
| 1535 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1536 | } |
| 1537 | |
| 1538 | /* void glPointParameterxOES ( GLenum pname, GLfixed param ) */ |
| 1539 | static void |
| 1540 | android_glPointParameterxOES__II |
| 1541 | (JNIEnv *_env, jobject _this, jint pname, jint param) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1542 | glPointParameterxOES( |
| 1543 | (GLenum)pname, |
| 1544 | (GLfixed)param |
| 1545 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1546 | } |
| 1547 | |
| 1548 | /* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */ |
| 1549 | static void |
| 1550 | android_glPointParameterxvOES__I_3II |
| 1551 | (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1552 | jint _exception = 0; |
| 1553 | const char * _exceptionType; |
| 1554 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1555 | GLfixed *params_base = (GLfixed *) 0; |
| 1556 | jint _remaining; |
| 1557 | GLfixed *params = (GLfixed *) 0; |
| 1558 | |
| 1559 | if (!params_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1560 | _exception = 1; |
| 1561 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1562 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1563 | goto exit; |
| 1564 | } |
| 1565 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1566 | _exception = 1; |
| 1567 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1568 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1569 | goto exit; |
| 1570 | } |
| 1571 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1572 | params_base = (GLfixed *) |
| 1573 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1574 | params = params_base + offset; |
| 1575 | |
| 1576 | glPointParameterxvOES( |
| 1577 | (GLenum)pname, |
| 1578 | (GLfixed *)params |
| 1579 | ); |
| 1580 | |
| 1581 | exit: |
| 1582 | if (params_base) { |
| 1583 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1584 | JNI_ABORT); |
| 1585 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1586 | if (_exception) { |
| 1587 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1588 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1589 | } |
| 1590 | |
| 1591 | /* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */ |
| 1592 | static void |
| 1593 | android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 |
| 1594 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1595 | jarray _array = (jarray) 0; |
| 1596 | jint _remaining; |
| 1597 | GLfixed *params = (GLfixed *) 0; |
| 1598 | |
| 1599 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1600 | glPointParameterxvOES( |
| 1601 | (GLenum)pname, |
| 1602 | (GLfixed *)params |
| 1603 | ); |
| 1604 | if (_array) { |
| 1605 | releasePointer(_env, _array, params, JNI_FALSE); |
| 1606 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1607 | } |
| 1608 | |
| 1609 | /* void glPointSizexOES ( GLfixed size ) */ |
| 1610 | static void |
| 1611 | android_glPointSizexOES__I |
| 1612 | (JNIEnv *_env, jobject _this, jint size) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1613 | glPointSizexOES( |
| 1614 | (GLfixed)size |
| 1615 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1616 | } |
| 1617 | |
| 1618 | /* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */ |
| 1619 | static void |
| 1620 | android_glPolygonOffsetxOES__II |
| 1621 | (JNIEnv *_env, jobject _this, jint factor, jint units) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1622 | glPolygonOffsetxOES( |
| 1623 | (GLfixed)factor, |
| 1624 | (GLfixed)units |
| 1625 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1626 | } |
| 1627 | |
| 1628 | /* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */ |
| 1629 | static void |
| 1630 | android_glRotatexOES__IIII |
| 1631 | (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1632 | glRotatexOES( |
| 1633 | (GLfixed)angle, |
| 1634 | (GLfixed)x, |
| 1635 | (GLfixed)y, |
| 1636 | (GLfixed)z |
| 1637 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1638 | } |
| 1639 | |
| 1640 | /* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */ |
| 1641 | static void |
| 1642 | android_glSampleCoveragexOES__IZ |
| 1643 | (JNIEnv *_env, jobject _this, jint value, jboolean invert) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1644 | glSampleCoveragexOES( |
| 1645 | (GLclampx)value, |
| 1646 | (GLboolean)invert |
| 1647 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1648 | } |
| 1649 | |
| 1650 | /* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */ |
| 1651 | static void |
| 1652 | android_glScalexOES__III |
| 1653 | (JNIEnv *_env, jobject _this, jint x, jint y, jint z) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1654 | glScalexOES( |
| 1655 | (GLfixed)x, |
| 1656 | (GLfixed)y, |
| 1657 | (GLfixed)z |
| 1658 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1659 | } |
| 1660 | |
| 1661 | /* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */ |
| 1662 | static void |
| 1663 | android_glTexEnvxOES__III |
| 1664 | (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1665 | glTexEnvxOES( |
| 1666 | (GLenum)target, |
| 1667 | (GLenum)pname, |
| 1668 | (GLfixed)param |
| 1669 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1670 | } |
| 1671 | |
| 1672 | /* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */ |
| 1673 | static void |
| 1674 | android_glTexEnvxvOES__II_3II |
| 1675 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1676 | jint _exception = 0; |
| 1677 | const char * _exceptionType; |
| 1678 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1679 | GLfixed *params_base = (GLfixed *) 0; |
| 1680 | jint _remaining; |
| 1681 | GLfixed *params = (GLfixed *) 0; |
| 1682 | |
| 1683 | if (!params_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1684 | _exception = 1; |
| 1685 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1686 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1687 | goto exit; |
| 1688 | } |
| 1689 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1690 | _exception = 1; |
| 1691 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1692 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1693 | goto exit; |
| 1694 | } |
| 1695 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1696 | params_base = (GLfixed *) |
| 1697 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1698 | params = params_base + offset; |
| 1699 | |
| 1700 | glTexEnvxvOES( |
| 1701 | (GLenum)target, |
| 1702 | (GLenum)pname, |
| 1703 | (GLfixed *)params |
| 1704 | ); |
| 1705 | |
| 1706 | exit: |
| 1707 | if (params_base) { |
| 1708 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1709 | JNI_ABORT); |
| 1710 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1711 | if (_exception) { |
| 1712 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1713 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1714 | } |
| 1715 | |
| 1716 | /* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */ |
| 1717 | static void |
| 1718 | android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 |
| 1719 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1720 | jarray _array = (jarray) 0; |
| 1721 | jint _remaining; |
| 1722 | GLfixed *params = (GLfixed *) 0; |
| 1723 | |
| 1724 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1725 | glTexEnvxvOES( |
| 1726 | (GLenum)target, |
| 1727 | (GLenum)pname, |
| 1728 | (GLfixed *)params |
| 1729 | ); |
| 1730 | if (_array) { |
| 1731 | releasePointer(_env, _array, params, JNI_FALSE); |
| 1732 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1733 | } |
| 1734 | |
| 1735 | /* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */ |
| 1736 | static void |
| 1737 | android_glTexParameterxOES__III |
| 1738 | (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1739 | glTexParameterxOES( |
| 1740 | (GLenum)target, |
| 1741 | (GLenum)pname, |
| 1742 | (GLfixed)param |
| 1743 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1744 | } |
| 1745 | |
| 1746 | /* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */ |
| 1747 | static void |
| 1748 | android_glTexParameterxvOES__II_3II |
| 1749 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1750 | jint _exception = 0; |
| 1751 | const char * _exceptionType; |
| 1752 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1753 | GLfixed *params_base = (GLfixed *) 0; |
| 1754 | jint _remaining; |
| 1755 | GLfixed *params = (GLfixed *) 0; |
| 1756 | |
| 1757 | if (!params_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1758 | _exception = 1; |
| 1759 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1760 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1761 | goto exit; |
| 1762 | } |
| 1763 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1764 | _exception = 1; |
| 1765 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1766 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1767 | goto exit; |
| 1768 | } |
| 1769 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1770 | params_base = (GLfixed *) |
| 1771 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1772 | params = params_base + offset; |
| 1773 | |
| 1774 | glTexParameterxvOES( |
| 1775 | (GLenum)target, |
| 1776 | (GLenum)pname, |
| 1777 | (GLfixed *)params |
| 1778 | ); |
| 1779 | |
| 1780 | exit: |
| 1781 | if (params_base) { |
| 1782 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1783 | JNI_ABORT); |
| 1784 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1785 | if (_exception) { |
| 1786 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1787 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1788 | } |
| 1789 | |
| 1790 | /* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */ |
| 1791 | static void |
| 1792 | android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 |
| 1793 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1794 | jarray _array = (jarray) 0; |
| 1795 | jint _remaining; |
| 1796 | GLfixed *params = (GLfixed *) 0; |
| 1797 | |
| 1798 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1799 | glTexParameterxvOES( |
| 1800 | (GLenum)target, |
| 1801 | (GLenum)pname, |
| 1802 | (GLfixed *)params |
| 1803 | ); |
| 1804 | if (_array) { |
| 1805 | releasePointer(_env, _array, params, JNI_FALSE); |
| 1806 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1807 | } |
| 1808 | |
| 1809 | /* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */ |
| 1810 | static void |
| 1811 | android_glTranslatexOES__III |
| 1812 | (JNIEnv *_env, jobject _this, jint x, jint y, jint z) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 1813 | glTranslatexOES( |
| 1814 | (GLfixed)x, |
| 1815 | (GLfixed)y, |
| 1816 | (GLfixed)z |
| 1817 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1818 | } |
| 1819 | |
| 1820 | /* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */ |
| 1821 | static jboolean |
| 1822 | android_glIsRenderbufferOES__I |
| 1823 | (JNIEnv *_env, jobject _this, jint renderbuffer) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1824 | GLboolean _returnValue; |
| 1825 | _returnValue = glIsRenderbufferOES( |
| 1826 | (GLuint)renderbuffer |
| 1827 | ); |
| 1828 | return _returnValue; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1829 | } |
| 1830 | |
| 1831 | /* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */ |
| 1832 | static void |
| 1833 | android_glBindRenderbufferOES__II |
| 1834 | (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1835 | glBindRenderbufferOES( |
| 1836 | (GLenum)target, |
| 1837 | (GLuint)renderbuffer |
| 1838 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1839 | } |
| 1840 | |
| 1841 | /* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */ |
| 1842 | static void |
| 1843 | android_glDeleteRenderbuffersOES__I_3II |
| 1844 | (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1845 | jint _exception = 0; |
| 1846 | const char * _exceptionType; |
| 1847 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1848 | GLuint *renderbuffers_base = (GLuint *) 0; |
| 1849 | jint _remaining; |
| 1850 | GLuint *renderbuffers = (GLuint *) 0; |
| 1851 | |
| 1852 | if (!renderbuffers_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1853 | _exception = 1; |
| 1854 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1855 | _exceptionMessage = "renderbuffers == null"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1856 | goto exit; |
| 1857 | } |
| 1858 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1859 | _exception = 1; |
| 1860 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1861 | _exceptionMessage = "offset < 0"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1862 | goto exit; |
| 1863 | } |
| 1864 | _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; |
| 1865 | if (_remaining < n) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1866 | _exception = 1; |
| 1867 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1868 | _exceptionMessage = "length - offset < n < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1869 | goto exit; |
| 1870 | } |
| 1871 | renderbuffers_base = (GLuint *) |
| 1872 | _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0); |
| 1873 | renderbuffers = renderbuffers_base + offset; |
| 1874 | |
| 1875 | glDeleteRenderbuffersOES( |
| 1876 | (GLsizei)n, |
| 1877 | (GLuint *)renderbuffers |
| 1878 | ); |
| 1879 | |
| 1880 | exit: |
| 1881 | if (renderbuffers_base) { |
| 1882 | _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, |
| 1883 | JNI_ABORT); |
| 1884 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1885 | if (_exception) { |
| 1886 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1887 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1888 | } |
| 1889 | |
| 1890 | /* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */ |
| 1891 | static void |
| 1892 | android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 |
| 1893 | (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1894 | jint _exception = 0; |
| 1895 | const char * _exceptionType; |
| 1896 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1897 | jarray _array = (jarray) 0; |
| 1898 | jint _remaining; |
| 1899 | GLuint *renderbuffers = (GLuint *) 0; |
| 1900 | |
| 1901 | renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining); |
| 1902 | if (_remaining < n) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1903 | _exception = 1; |
| 1904 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1905 | _exceptionMessage = "remaining() < n < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1906 | goto exit; |
| 1907 | } |
| 1908 | glDeleteRenderbuffersOES( |
| 1909 | (GLsizei)n, |
| 1910 | (GLuint *)renderbuffers |
| 1911 | ); |
| 1912 | |
| 1913 | exit: |
| 1914 | if (_array) { |
| 1915 | releasePointer(_env, _array, renderbuffers, JNI_FALSE); |
| 1916 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1917 | if (_exception) { |
| 1918 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1919 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1920 | } |
| 1921 | |
| 1922 | /* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */ |
| 1923 | static void |
| 1924 | android_glGenRenderbuffersOES__I_3II |
| 1925 | (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1926 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1927 | const char * _exceptionType; |
| 1928 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1929 | GLuint *renderbuffers_base = (GLuint *) 0; |
| 1930 | jint _remaining; |
| 1931 | GLuint *renderbuffers = (GLuint *) 0; |
| 1932 | |
| 1933 | if (!renderbuffers_ref) { |
| 1934 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1935 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1936 | _exceptionMessage = "renderbuffers == null"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1937 | goto exit; |
| 1938 | } |
| 1939 | if (offset < 0) { |
| 1940 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1941 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1942 | _exceptionMessage = "offset < 0"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1943 | goto exit; |
| 1944 | } |
| 1945 | _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; |
| 1946 | if (_remaining < n) { |
| 1947 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1948 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1949 | _exceptionMessage = "length - offset < n < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1950 | goto exit; |
| 1951 | } |
| 1952 | renderbuffers_base = (GLuint *) |
| 1953 | _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0); |
| 1954 | renderbuffers = renderbuffers_base + offset; |
| 1955 | |
| 1956 | glGenRenderbuffersOES( |
| 1957 | (GLsizei)n, |
| 1958 | (GLuint *)renderbuffers |
| 1959 | ); |
| 1960 | |
| 1961 | exit: |
| 1962 | if (renderbuffers_base) { |
| 1963 | _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, |
| 1964 | _exception ? JNI_ABORT: 0); |
| 1965 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1966 | if (_exception) { |
| 1967 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1968 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1969 | } |
| 1970 | |
| 1971 | /* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */ |
| 1972 | static void |
| 1973 | android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 |
| 1974 | (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1975 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1976 | const char * _exceptionType; |
| 1977 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1978 | jarray _array = (jarray) 0; |
| 1979 | jint _remaining; |
| 1980 | GLuint *renderbuffers = (GLuint *) 0; |
| 1981 | |
| 1982 | renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining); |
| 1983 | if (_remaining < n) { |
| 1984 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1985 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1986 | _exceptionMessage = "remaining() < n < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 1987 | goto exit; |
| 1988 | } |
| 1989 | glGenRenderbuffersOES( |
| 1990 | (GLsizei)n, |
| 1991 | (GLuint *)renderbuffers |
| 1992 | ); |
| 1993 | |
| 1994 | exit: |
| 1995 | if (_array) { |
| 1996 | releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE); |
| 1997 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 1998 | if (_exception) { |
| 1999 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2000 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2001 | } |
| 2002 | |
| 2003 | /* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */ |
| 2004 | static void |
| 2005 | android_glRenderbufferStorageOES__IIII |
| 2006 | (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2007 | glRenderbufferStorageOES( |
| 2008 | (GLenum)target, |
| 2009 | (GLenum)internalformat, |
| 2010 | (GLsizei)width, |
| 2011 | (GLsizei)height |
| 2012 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2013 | } |
| 2014 | |
| 2015 | /* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */ |
| 2016 | static void |
| 2017 | android_glGetRenderbufferParameterivOES__II_3II |
| 2018 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2019 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2020 | const char * _exceptionType; |
| 2021 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2022 | GLint *params_base = (GLint *) 0; |
| 2023 | jint _remaining; |
| 2024 | GLint *params = (GLint *) 0; |
| 2025 | |
| 2026 | if (!params_ref) { |
| 2027 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2028 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2029 | _exceptionMessage = "params == null"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2030 | goto exit; |
| 2031 | } |
| 2032 | if (offset < 0) { |
| 2033 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2034 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2035 | _exceptionMessage = "offset < 0"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2036 | goto exit; |
| 2037 | } |
| 2038 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2039 | if (_remaining < 1) { |
| 2040 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2041 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2042 | _exceptionMessage = "length - offset < 1 < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2043 | goto exit; |
| 2044 | } |
| 2045 | params_base = (GLint *) |
| 2046 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2047 | params = params_base + offset; |
| 2048 | |
| 2049 | glGetRenderbufferParameterivOES( |
| 2050 | (GLenum)target, |
| 2051 | (GLenum)pname, |
| 2052 | (GLint *)params |
| 2053 | ); |
| 2054 | |
| 2055 | exit: |
| 2056 | if (params_base) { |
| 2057 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2058 | _exception ? JNI_ABORT: 0); |
| 2059 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2060 | if (_exception) { |
| 2061 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2062 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2063 | } |
| 2064 | |
| 2065 | /* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */ |
| 2066 | static void |
| 2067 | android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 |
| 2068 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2069 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2070 | const char * _exceptionType; |
| 2071 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2072 | jarray _array = (jarray) 0; |
| 2073 | jint _remaining; |
| 2074 | GLint *params = (GLint *) 0; |
| 2075 | |
| 2076 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2077 | if (_remaining < 1) { |
| 2078 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2079 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2080 | _exceptionMessage = "remaining() < 1 < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2081 | goto exit; |
| 2082 | } |
| 2083 | glGetRenderbufferParameterivOES( |
| 2084 | (GLenum)target, |
| 2085 | (GLenum)pname, |
| 2086 | (GLint *)params |
| 2087 | ); |
| 2088 | |
| 2089 | exit: |
| 2090 | if (_array) { |
| 2091 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 2092 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2093 | if (_exception) { |
| 2094 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2095 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2096 | } |
| 2097 | |
| 2098 | /* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */ |
| 2099 | static jboolean |
| 2100 | android_glIsFramebufferOES__I |
| 2101 | (JNIEnv *_env, jobject _this, jint framebuffer) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2102 | GLboolean _returnValue; |
| 2103 | _returnValue = glIsFramebufferOES( |
| 2104 | (GLuint)framebuffer |
| 2105 | ); |
| 2106 | return _returnValue; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2107 | } |
| 2108 | |
| 2109 | /* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */ |
| 2110 | static void |
| 2111 | android_glBindFramebufferOES__II |
| 2112 | (JNIEnv *_env, jobject _this, jint target, jint framebuffer) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2113 | glBindFramebufferOES( |
| 2114 | (GLenum)target, |
| 2115 | (GLuint)framebuffer |
| 2116 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2117 | } |
| 2118 | |
| 2119 | /* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */ |
| 2120 | static void |
| 2121 | android_glDeleteFramebuffersOES__I_3II |
| 2122 | (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2123 | jint _exception = 0; |
| 2124 | const char * _exceptionType; |
| 2125 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2126 | GLuint *framebuffers_base = (GLuint *) 0; |
| 2127 | jint _remaining; |
| 2128 | GLuint *framebuffers = (GLuint *) 0; |
| 2129 | |
| 2130 | if (!framebuffers_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2131 | _exception = 1; |
| 2132 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2133 | _exceptionMessage = "framebuffers == null"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2134 | goto exit; |
| 2135 | } |
| 2136 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2137 | _exception = 1; |
| 2138 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2139 | _exceptionMessage = "offset < 0"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2140 | goto exit; |
| 2141 | } |
| 2142 | _remaining = _env->GetArrayLength(framebuffers_ref) - offset; |
| 2143 | if (_remaining < n) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2144 | _exception = 1; |
| 2145 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2146 | _exceptionMessage = "length - offset < n < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2147 | goto exit; |
| 2148 | } |
| 2149 | framebuffers_base = (GLuint *) |
| 2150 | _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0); |
| 2151 | framebuffers = framebuffers_base + offset; |
| 2152 | |
| 2153 | glDeleteFramebuffersOES( |
| 2154 | (GLsizei)n, |
| 2155 | (GLuint *)framebuffers |
| 2156 | ); |
| 2157 | |
| 2158 | exit: |
| 2159 | if (framebuffers_base) { |
| 2160 | _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, |
| 2161 | JNI_ABORT); |
| 2162 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2163 | if (_exception) { |
| 2164 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2165 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2166 | } |
| 2167 | |
| 2168 | /* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */ |
| 2169 | static void |
| 2170 | android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 |
| 2171 | (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2172 | jint _exception = 0; |
| 2173 | const char * _exceptionType; |
| 2174 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2175 | jarray _array = (jarray) 0; |
| 2176 | jint _remaining; |
| 2177 | GLuint *framebuffers = (GLuint *) 0; |
| 2178 | |
| 2179 | framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining); |
| 2180 | if (_remaining < n) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2181 | _exception = 1; |
| 2182 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2183 | _exceptionMessage = "remaining() < n < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2184 | goto exit; |
| 2185 | } |
| 2186 | glDeleteFramebuffersOES( |
| 2187 | (GLsizei)n, |
| 2188 | (GLuint *)framebuffers |
| 2189 | ); |
| 2190 | |
| 2191 | exit: |
| 2192 | if (_array) { |
| 2193 | releasePointer(_env, _array, framebuffers, JNI_FALSE); |
| 2194 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2195 | if (_exception) { |
| 2196 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2197 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2198 | } |
| 2199 | |
| 2200 | /* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */ |
| 2201 | static void |
| 2202 | android_glGenFramebuffersOES__I_3II |
| 2203 | (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2204 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2205 | const char * _exceptionType; |
| 2206 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2207 | GLuint *framebuffers_base = (GLuint *) 0; |
| 2208 | jint _remaining; |
| 2209 | GLuint *framebuffers = (GLuint *) 0; |
| 2210 | |
| 2211 | if (!framebuffers_ref) { |
| 2212 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2213 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2214 | _exceptionMessage = "framebuffers == null"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2215 | goto exit; |
| 2216 | } |
| 2217 | if (offset < 0) { |
| 2218 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2219 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2220 | _exceptionMessage = "offset < 0"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2221 | goto exit; |
| 2222 | } |
| 2223 | _remaining = _env->GetArrayLength(framebuffers_ref) - offset; |
| 2224 | if (_remaining < n) { |
| 2225 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2226 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2227 | _exceptionMessage = "length - offset < n < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2228 | goto exit; |
| 2229 | } |
| 2230 | framebuffers_base = (GLuint *) |
| 2231 | _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0); |
| 2232 | framebuffers = framebuffers_base + offset; |
| 2233 | |
| 2234 | glGenFramebuffersOES( |
| 2235 | (GLsizei)n, |
| 2236 | (GLuint *)framebuffers |
| 2237 | ); |
| 2238 | |
| 2239 | exit: |
| 2240 | if (framebuffers_base) { |
| 2241 | _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, |
| 2242 | _exception ? JNI_ABORT: 0); |
| 2243 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2244 | if (_exception) { |
| 2245 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2246 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2247 | } |
| 2248 | |
| 2249 | /* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */ |
| 2250 | static void |
| 2251 | android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 |
| 2252 | (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2253 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2254 | const char * _exceptionType; |
| 2255 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2256 | jarray _array = (jarray) 0; |
| 2257 | jint _remaining; |
| 2258 | GLuint *framebuffers = (GLuint *) 0; |
| 2259 | |
| 2260 | framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining); |
| 2261 | if (_remaining < n) { |
| 2262 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2263 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2264 | _exceptionMessage = "remaining() < n < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2265 | goto exit; |
| 2266 | } |
| 2267 | glGenFramebuffersOES( |
| 2268 | (GLsizei)n, |
| 2269 | (GLuint *)framebuffers |
| 2270 | ); |
| 2271 | |
| 2272 | exit: |
| 2273 | if (_array) { |
| 2274 | releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE); |
| 2275 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2276 | if (_exception) { |
| 2277 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2278 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2279 | } |
| 2280 | |
| 2281 | /* GLenum glCheckFramebufferStatusOES ( GLenum target ) */ |
| 2282 | static jint |
| 2283 | android_glCheckFramebufferStatusOES__I |
| 2284 | (JNIEnv *_env, jobject _this, jint target) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2285 | GLenum _returnValue; |
| 2286 | _returnValue = glCheckFramebufferStatusOES( |
| 2287 | (GLenum)target |
| 2288 | ); |
| 2289 | return _returnValue; |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2290 | } |
| 2291 | |
| 2292 | /* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */ |
| 2293 | static void |
| 2294 | android_glFramebufferRenderbufferOES__IIII |
| 2295 | (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2296 | glFramebufferRenderbufferOES( |
| 2297 | (GLenum)target, |
| 2298 | (GLenum)attachment, |
| 2299 | (GLenum)renderbuffertarget, |
| 2300 | (GLuint)renderbuffer |
| 2301 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2302 | } |
| 2303 | |
| 2304 | /* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */ |
| 2305 | static void |
| 2306 | android_glFramebufferTexture2DOES__IIIII |
| 2307 | (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2308 | glFramebufferTexture2DOES( |
| 2309 | (GLenum)target, |
| 2310 | (GLenum)attachment, |
| 2311 | (GLenum)textarget, |
| 2312 | (GLuint)texture, |
| 2313 | (GLint)level |
| 2314 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2315 | } |
| 2316 | |
| 2317 | /* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */ |
| 2318 | static void |
| 2319 | android_glGetFramebufferAttachmentParameterivOES__III_3II |
| 2320 | (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2321 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2322 | const char * _exceptionType; |
| 2323 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2324 | GLint *params_base = (GLint *) 0; |
| 2325 | jint _remaining; |
| 2326 | GLint *params = (GLint *) 0; |
| 2327 | |
| 2328 | if (!params_ref) { |
| 2329 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2330 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2331 | _exceptionMessage = "params == null"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2332 | goto exit; |
| 2333 | } |
| 2334 | if (offset < 0) { |
| 2335 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2336 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2337 | _exceptionMessage = "offset < 0"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2338 | goto exit; |
| 2339 | } |
| 2340 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2341 | if (_remaining < 1) { |
| 2342 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2343 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2344 | _exceptionMessage = "length - offset < 1 < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2345 | goto exit; |
| 2346 | } |
| 2347 | params_base = (GLint *) |
| 2348 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2349 | params = params_base + offset; |
| 2350 | |
| 2351 | glGetFramebufferAttachmentParameterivOES( |
| 2352 | (GLenum)target, |
| 2353 | (GLenum)attachment, |
| 2354 | (GLenum)pname, |
| 2355 | (GLint *)params |
| 2356 | ); |
| 2357 | |
| 2358 | exit: |
| 2359 | if (params_base) { |
| 2360 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2361 | _exception ? JNI_ABORT: 0); |
| 2362 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2363 | if (_exception) { |
| 2364 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2365 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2366 | } |
| 2367 | |
| 2368 | /* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */ |
| 2369 | static void |
| 2370 | android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 |
| 2371 | (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2372 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2373 | const char * _exceptionType; |
| 2374 | const char * _exceptionMessage; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2375 | jarray _array = (jarray) 0; |
| 2376 | jint _remaining; |
| 2377 | GLint *params = (GLint *) 0; |
| 2378 | |
| 2379 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2380 | if (_remaining < 1) { |
| 2381 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2382 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2383 | _exceptionMessage = "remaining() < 1 < needed"; |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2384 | goto exit; |
| 2385 | } |
| 2386 | glGetFramebufferAttachmentParameterivOES( |
| 2387 | (GLenum)target, |
| 2388 | (GLenum)attachment, |
| 2389 | (GLenum)pname, |
| 2390 | (GLint *)params |
| 2391 | ); |
| 2392 | |
| 2393 | exit: |
| 2394 | if (_array) { |
| 2395 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 2396 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2397 | if (_exception) { |
| 2398 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2399 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2400 | } |
| 2401 | |
| 2402 | /* void glGenerateMipmapOES ( GLenum target ) */ |
| 2403 | static void |
| 2404 | android_glGenerateMipmapOES__I |
| 2405 | (JNIEnv *_env, jobject _this, jint target) { |
Jack Palevich | 7310867 | 2011-03-28 14:49:12 -0700 | [diff] [blame] | 2406 | glGenerateMipmapOES( |
| 2407 | (GLenum)target |
| 2408 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2409 | } |
| 2410 | |
| 2411 | /* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */ |
| 2412 | static void |
| 2413 | android_glCurrentPaletteMatrixOES__I |
| 2414 | (JNIEnv *_env, jobject _this, jint matrixpaletteindex) { |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 2415 | glCurrentPaletteMatrixOES( |
| 2416 | (GLuint)matrixpaletteindex |
| 2417 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2418 | } |
| 2419 | |
| 2420 | /* void glLoadPaletteFromModelViewMatrixOES ( void ) */ |
| 2421 | static void |
| 2422 | android_glLoadPaletteFromModelViewMatrixOES__ |
| 2423 | (JNIEnv *_env, jobject _this) { |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 2424 | glLoadPaletteFromModelViewMatrixOES(); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2425 | } |
| 2426 | |
| 2427 | /* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */ |
| 2428 | static void |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 2429 | android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I |
| 2430 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) { |
| 2431 | jarray _array = (jarray) 0; |
| 2432 | jint _remaining; |
| 2433 | GLvoid *pointer = (GLvoid *) 0; |
| 2434 | |
| 2435 | if (pointer_buf) { |
| 2436 | pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); |
| 2437 | if ( ! pointer ) { |
| 2438 | return; |
| 2439 | } |
| 2440 | } |
| 2441 | glMatrixIndexPointerOESBounds( |
| 2442 | (GLint)size, |
| 2443 | (GLenum)type, |
| 2444 | (GLsizei)stride, |
| 2445 | (GLvoid *)pointer, |
| 2446 | (GLsizei)remaining |
| 2447 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2448 | } |
| 2449 | |
| 2450 | /* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */ |
| 2451 | static void |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 2452 | android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I |
| 2453 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) { |
| 2454 | jarray _array = (jarray) 0; |
| 2455 | jint _remaining; |
| 2456 | GLvoid *pointer = (GLvoid *) 0; |
| 2457 | |
| 2458 | if (pointer_buf) { |
| 2459 | pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); |
| 2460 | if ( ! pointer ) { |
| 2461 | return; |
| 2462 | } |
| 2463 | } |
| 2464 | glWeightPointerOESBounds( |
| 2465 | (GLint)size, |
| 2466 | (GLenum)type, |
| 2467 | (GLsizei)stride, |
| 2468 | (GLvoid *)pointer, |
| 2469 | (GLsizei)remaining |
| 2470 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2471 | } |
| 2472 | |
| 2473 | /* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */ |
| 2474 | static void |
| 2475 | android_glDepthRangefOES__FF |
| 2476 | (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2477 | glDepthRangefOES( |
| 2478 | (GLclampf)zNear, |
| 2479 | (GLclampf)zFar |
| 2480 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2481 | } |
| 2482 | |
| 2483 | /* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */ |
| 2484 | static void |
| 2485 | android_glFrustumfOES__FFFFFF |
| 2486 | (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2487 | glFrustumfOES( |
| 2488 | (GLfloat)left, |
| 2489 | (GLfloat)right, |
| 2490 | (GLfloat)bottom, |
| 2491 | (GLfloat)top, |
| 2492 | (GLfloat)zNear, |
| 2493 | (GLfloat)zFar |
| 2494 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2495 | } |
| 2496 | |
| 2497 | /* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */ |
| 2498 | static void |
| 2499 | android_glOrthofOES__FFFFFF |
| 2500 | (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2501 | glOrthofOES( |
| 2502 | (GLfloat)left, |
| 2503 | (GLfloat)right, |
| 2504 | (GLfloat)bottom, |
| 2505 | (GLfloat)top, |
| 2506 | (GLfloat)zNear, |
| 2507 | (GLfloat)zFar |
| 2508 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2509 | } |
| 2510 | |
| 2511 | /* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */ |
| 2512 | static void |
| 2513 | android_glClipPlanefOES__I_3FI |
| 2514 | (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2515 | jint _exception = 0; |
| 2516 | const char * _exceptionType; |
| 2517 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2518 | GLfloat *equation_base = (GLfloat *) 0; |
| 2519 | jint _remaining; |
| 2520 | GLfloat *equation = (GLfloat *) 0; |
| 2521 | |
| 2522 | if (!equation_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2523 | _exception = 1; |
| 2524 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2525 | _exceptionMessage = "equation == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2526 | goto exit; |
| 2527 | } |
| 2528 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2529 | _exception = 1; |
| 2530 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2531 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2532 | goto exit; |
| 2533 | } |
| 2534 | _remaining = _env->GetArrayLength(equation_ref) - offset; |
| 2535 | equation_base = (GLfloat *) |
| 2536 | _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0); |
| 2537 | equation = equation_base + offset; |
| 2538 | |
| 2539 | glClipPlanefOES( |
| 2540 | (GLenum)plane, |
| 2541 | (GLfloat *)equation |
| 2542 | ); |
| 2543 | |
| 2544 | exit: |
| 2545 | if (equation_base) { |
| 2546 | _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base, |
| 2547 | JNI_ABORT); |
| 2548 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2549 | if (_exception) { |
| 2550 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2551 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2552 | } |
| 2553 | |
| 2554 | /* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */ |
| 2555 | static void |
| 2556 | android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 |
| 2557 | (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2558 | jarray _array = (jarray) 0; |
| 2559 | jint _remaining; |
| 2560 | GLfloat *equation = (GLfloat *) 0; |
| 2561 | |
| 2562 | equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining); |
| 2563 | glClipPlanefOES( |
| 2564 | (GLenum)plane, |
| 2565 | (GLfloat *)equation |
| 2566 | ); |
| 2567 | if (_array) { |
| 2568 | releasePointer(_env, _array, equation, JNI_FALSE); |
| 2569 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2570 | } |
| 2571 | |
| 2572 | /* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */ |
| 2573 | static void |
| 2574 | android_glGetClipPlanefOES__I_3FI |
| 2575 | (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2576 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2577 | const char * _exceptionType; |
| 2578 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2579 | GLfloat *eqn_base = (GLfloat *) 0; |
| 2580 | jint _remaining; |
| 2581 | GLfloat *eqn = (GLfloat *) 0; |
| 2582 | |
| 2583 | if (!eqn_ref) { |
| 2584 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2585 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2586 | _exceptionMessage = "eqn == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2587 | goto exit; |
| 2588 | } |
| 2589 | if (offset < 0) { |
| 2590 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2591 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2592 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2593 | goto exit; |
| 2594 | } |
| 2595 | _remaining = _env->GetArrayLength(eqn_ref) - offset; |
| 2596 | if (_remaining < 4) { |
| 2597 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2598 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2599 | _exceptionMessage = "length - offset < 4 < needed"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2600 | goto exit; |
| 2601 | } |
| 2602 | eqn_base = (GLfloat *) |
| 2603 | _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0); |
| 2604 | eqn = eqn_base + offset; |
| 2605 | |
| 2606 | glGetClipPlanefOES( |
| 2607 | (GLenum)pname, |
| 2608 | (GLfloat *)eqn |
| 2609 | ); |
| 2610 | |
| 2611 | exit: |
| 2612 | if (eqn_base) { |
| 2613 | _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base, |
| 2614 | _exception ? JNI_ABORT: 0); |
| 2615 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2616 | if (_exception) { |
| 2617 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2618 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2619 | } |
| 2620 | |
| 2621 | /* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */ |
| 2622 | static void |
| 2623 | android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 |
| 2624 | (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2625 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2626 | const char * _exceptionType; |
| 2627 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2628 | jarray _array = (jarray) 0; |
| 2629 | jint _remaining; |
| 2630 | GLfloat *eqn = (GLfloat *) 0; |
| 2631 | |
| 2632 | eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining); |
| 2633 | if (_remaining < 4) { |
| 2634 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2635 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2636 | _exceptionMessage = "remaining() < 4 < needed"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2637 | goto exit; |
| 2638 | } |
| 2639 | glGetClipPlanefOES( |
| 2640 | (GLenum)pname, |
| 2641 | (GLfloat *)eqn |
| 2642 | ); |
| 2643 | |
| 2644 | exit: |
| 2645 | if (_array) { |
| 2646 | releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE); |
| 2647 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2648 | if (_exception) { |
| 2649 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2650 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2651 | } |
| 2652 | |
| 2653 | /* void glClearDepthfOES ( GLclampf depth ) */ |
| 2654 | static void |
| 2655 | android_glClearDepthfOES__F |
| 2656 | (JNIEnv *_env, jobject _this, jfloat depth) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2657 | glClearDepthfOES( |
| 2658 | (GLclampf)depth |
| 2659 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2660 | } |
| 2661 | |
| 2662 | /* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */ |
| 2663 | static void |
| 2664 | android_glTexGenfOES__IIF |
| 2665 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2666 | glTexGenfOES( |
| 2667 | (GLenum)coord, |
| 2668 | (GLenum)pname, |
| 2669 | (GLfloat)param |
| 2670 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2671 | } |
| 2672 | |
| 2673 | /* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */ |
| 2674 | static void |
| 2675 | android_glTexGenfvOES__II_3FI |
| 2676 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2677 | jint _exception = 0; |
| 2678 | const char * _exceptionType; |
| 2679 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2680 | GLfloat *params_base = (GLfloat *) 0; |
| 2681 | jint _remaining; |
| 2682 | GLfloat *params = (GLfloat *) 0; |
| 2683 | |
| 2684 | if (!params_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2685 | _exception = 1; |
| 2686 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2687 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2688 | goto exit; |
| 2689 | } |
| 2690 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2691 | _exception = 1; |
| 2692 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2693 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2694 | goto exit; |
| 2695 | } |
| 2696 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2697 | params_base = (GLfloat *) |
| 2698 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2699 | params = params_base + offset; |
| 2700 | |
| 2701 | glTexGenfvOES( |
| 2702 | (GLenum)coord, |
| 2703 | (GLenum)pname, |
| 2704 | (GLfloat *)params |
| 2705 | ); |
| 2706 | |
| 2707 | exit: |
| 2708 | if (params_base) { |
| 2709 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2710 | JNI_ABORT); |
| 2711 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2712 | if (_exception) { |
| 2713 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2714 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2715 | } |
| 2716 | |
| 2717 | /* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */ |
| 2718 | static void |
| 2719 | android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 |
| 2720 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2721 | jarray _array = (jarray) 0; |
| 2722 | jint _remaining; |
| 2723 | GLfloat *params = (GLfloat *) 0; |
| 2724 | |
| 2725 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2726 | glTexGenfvOES( |
| 2727 | (GLenum)coord, |
| 2728 | (GLenum)pname, |
| 2729 | (GLfloat *)params |
| 2730 | ); |
| 2731 | if (_array) { |
| 2732 | releasePointer(_env, _array, params, JNI_FALSE); |
| 2733 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2734 | } |
| 2735 | |
| 2736 | /* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */ |
| 2737 | static void |
| 2738 | android_glTexGeniOES__III |
| 2739 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2740 | glTexGeniOES( |
| 2741 | (GLenum)coord, |
| 2742 | (GLenum)pname, |
| 2743 | (GLint)param |
| 2744 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2745 | } |
| 2746 | |
| 2747 | /* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */ |
| 2748 | static void |
| 2749 | android_glTexGenivOES__II_3II |
| 2750 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2751 | jint _exception = 0; |
| 2752 | const char * _exceptionType; |
| 2753 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2754 | GLint *params_base = (GLint *) 0; |
| 2755 | jint _remaining; |
| 2756 | GLint *params = (GLint *) 0; |
| 2757 | |
| 2758 | if (!params_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2759 | _exception = 1; |
| 2760 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2761 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2762 | goto exit; |
| 2763 | } |
| 2764 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2765 | _exception = 1; |
| 2766 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2767 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2768 | goto exit; |
| 2769 | } |
| 2770 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2771 | params_base = (GLint *) |
| 2772 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2773 | params = params_base + offset; |
| 2774 | |
| 2775 | glTexGenivOES( |
| 2776 | (GLenum)coord, |
| 2777 | (GLenum)pname, |
| 2778 | (GLint *)params |
| 2779 | ); |
| 2780 | |
| 2781 | exit: |
| 2782 | if (params_base) { |
| 2783 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2784 | JNI_ABORT); |
| 2785 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2786 | if (_exception) { |
| 2787 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2788 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2789 | } |
| 2790 | |
| 2791 | /* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */ |
| 2792 | static void |
| 2793 | android_glTexGenivOES__IILjava_nio_IntBuffer_2 |
| 2794 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2795 | jarray _array = (jarray) 0; |
| 2796 | jint _remaining; |
| 2797 | GLint *params = (GLint *) 0; |
| 2798 | |
| 2799 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2800 | glTexGenivOES( |
| 2801 | (GLenum)coord, |
| 2802 | (GLenum)pname, |
| 2803 | (GLint *)params |
| 2804 | ); |
| 2805 | if (_array) { |
| 2806 | releasePointer(_env, _array, params, JNI_FALSE); |
| 2807 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2808 | } |
| 2809 | |
| 2810 | /* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */ |
| 2811 | static void |
| 2812 | android_glTexGenxOES__III |
| 2813 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2814 | glTexGenxOES( |
| 2815 | (GLenum)coord, |
| 2816 | (GLenum)pname, |
| 2817 | (GLfixed)param |
| 2818 | ); |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2819 | } |
| 2820 | |
| 2821 | /* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */ |
| 2822 | static void |
| 2823 | android_glTexGenxvOES__II_3II |
| 2824 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2825 | jint _exception = 0; |
| 2826 | const char * _exceptionType; |
| 2827 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2828 | GLfixed *params_base = (GLfixed *) 0; |
| 2829 | jint _remaining; |
| 2830 | GLfixed *params = (GLfixed *) 0; |
| 2831 | |
| 2832 | if (!params_ref) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2833 | _exception = 1; |
| 2834 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2835 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2836 | goto exit; |
| 2837 | } |
| 2838 | if (offset < 0) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2839 | _exception = 1; |
| 2840 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2841 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2842 | goto exit; |
| 2843 | } |
| 2844 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2845 | params_base = (GLfixed *) |
| 2846 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2847 | params = params_base + offset; |
| 2848 | |
| 2849 | glTexGenxvOES( |
| 2850 | (GLenum)coord, |
| 2851 | (GLenum)pname, |
| 2852 | (GLfixed *)params |
| 2853 | ); |
| 2854 | |
| 2855 | exit: |
| 2856 | if (params_base) { |
| 2857 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2858 | JNI_ABORT); |
| 2859 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2860 | if (_exception) { |
| 2861 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2862 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2863 | } |
| 2864 | |
| 2865 | /* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */ |
| 2866 | static void |
| 2867 | android_glTexGenxvOES__IILjava_nio_IntBuffer_2 |
| 2868 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2869 | jarray _array = (jarray) 0; |
| 2870 | jint _remaining; |
| 2871 | GLfixed *params = (GLfixed *) 0; |
| 2872 | |
| 2873 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2874 | glTexGenxvOES( |
| 2875 | (GLenum)coord, |
| 2876 | (GLenum)pname, |
| 2877 | (GLfixed *)params |
| 2878 | ); |
| 2879 | if (_array) { |
| 2880 | releasePointer(_env, _array, params, JNI_FALSE); |
| 2881 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2882 | } |
| 2883 | |
| 2884 | /* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */ |
| 2885 | static void |
| 2886 | android_glGetTexGenfvOES__II_3FI |
| 2887 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2888 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2889 | const char * _exceptionType; |
| 2890 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2891 | GLfloat *params_base = (GLfloat *) 0; |
| 2892 | jint _remaining; |
| 2893 | GLfloat *params = (GLfloat *) 0; |
| 2894 | |
| 2895 | if (!params_ref) { |
| 2896 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2897 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2898 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2899 | goto exit; |
| 2900 | } |
| 2901 | if (offset < 0) { |
| 2902 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2903 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2904 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2905 | goto exit; |
| 2906 | } |
| 2907 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2908 | params_base = (GLfloat *) |
| 2909 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2910 | params = params_base + offset; |
| 2911 | |
| 2912 | glGetTexGenfvOES( |
| 2913 | (GLenum)coord, |
| 2914 | (GLenum)pname, |
| 2915 | (GLfloat *)params |
| 2916 | ); |
| 2917 | |
| 2918 | exit: |
| 2919 | if (params_base) { |
| 2920 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2921 | _exception ? JNI_ABORT: 0); |
| 2922 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2923 | if (_exception) { |
| 2924 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2925 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2926 | } |
| 2927 | |
| 2928 | /* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */ |
| 2929 | static void |
| 2930 | android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 |
| 2931 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2932 | jarray _array = (jarray) 0; |
| 2933 | jint _remaining; |
| 2934 | GLfloat *params = (GLfloat *) 0; |
| 2935 | |
| 2936 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2937 | glGetTexGenfvOES( |
| 2938 | (GLenum)coord, |
| 2939 | (GLenum)pname, |
| 2940 | (GLfloat *)params |
| 2941 | ); |
| 2942 | if (_array) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2943 | releasePointer(_env, _array, params, JNI_TRUE); |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2944 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2945 | } |
| 2946 | |
| 2947 | /* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */ |
| 2948 | static void |
| 2949 | android_glGetTexGenivOES__II_3II |
| 2950 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2951 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2952 | const char * _exceptionType; |
| 2953 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2954 | GLint *params_base = (GLint *) 0; |
| 2955 | jint _remaining; |
| 2956 | GLint *params = (GLint *) 0; |
| 2957 | |
| 2958 | if (!params_ref) { |
| 2959 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2960 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2961 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2962 | goto exit; |
| 2963 | } |
| 2964 | if (offset < 0) { |
| 2965 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2966 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 2967 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2968 | goto exit; |
| 2969 | } |
| 2970 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2971 | params_base = (GLint *) |
| 2972 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2973 | params = params_base + offset; |
| 2974 | |
| 2975 | glGetTexGenivOES( |
| 2976 | (GLenum)coord, |
| 2977 | (GLenum)pname, |
| 2978 | (GLint *)params |
| 2979 | ); |
| 2980 | |
| 2981 | exit: |
| 2982 | if (params_base) { |
| 2983 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2984 | _exception ? JNI_ABORT: 0); |
| 2985 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 2986 | if (_exception) { |
| 2987 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 2988 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 2989 | } |
| 2990 | |
| 2991 | /* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */ |
| 2992 | static void |
| 2993 | android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 |
| 2994 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 2995 | jarray _array = (jarray) 0; |
| 2996 | jint _remaining; |
| 2997 | GLint *params = (GLint *) 0; |
| 2998 | |
| 2999 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 3000 | glGetTexGenivOES( |
| 3001 | (GLenum)coord, |
| 3002 | (GLenum)pname, |
| 3003 | (GLint *)params |
| 3004 | ); |
| 3005 | if (_array) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 3006 | releasePointer(_env, _array, params, JNI_TRUE); |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 3007 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 3008 | } |
| 3009 | |
| 3010 | /* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */ |
| 3011 | static void |
| 3012 | android_glGetTexGenxvOES__II_3II |
| 3013 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 3014 | jint _exception = 0; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 3015 | const char * _exceptionType; |
| 3016 | const char * _exceptionMessage; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 3017 | GLfixed *params_base = (GLfixed *) 0; |
| 3018 | jint _remaining; |
| 3019 | GLfixed *params = (GLfixed *) 0; |
| 3020 | |
| 3021 | if (!params_ref) { |
| 3022 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 3023 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 3024 | _exceptionMessage = "params == null"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 3025 | goto exit; |
| 3026 | } |
| 3027 | if (offset < 0) { |
| 3028 | _exception = 1; |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 3029 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 3030 | _exceptionMessage = "offset < 0"; |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 3031 | goto exit; |
| 3032 | } |
| 3033 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 3034 | params_base = (GLfixed *) |
| 3035 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 3036 | params = params_base + offset; |
| 3037 | |
| 3038 | glGetTexGenxvOES( |
| 3039 | (GLenum)coord, |
| 3040 | (GLenum)pname, |
| 3041 | (GLfixed *)params |
| 3042 | ); |
| 3043 | |
| 3044 | exit: |
| 3045 | if (params_base) { |
| 3046 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 3047 | _exception ? JNI_ABORT: 0); |
| 3048 | } |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 3049 | if (_exception) { |
| 3050 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 3051 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 3052 | } |
| 3053 | |
| 3054 | /* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */ |
| 3055 | static void |
| 3056 | android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 |
| 3057 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 3058 | jarray _array = (jarray) 0; |
| 3059 | jint _remaining; |
| 3060 | GLfixed *params = (GLfixed *) 0; |
| 3061 | |
| 3062 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 3063 | glGetTexGenxvOES( |
| 3064 | (GLenum)coord, |
| 3065 | (GLenum)pname, |
| 3066 | (GLfixed *)params |
| 3067 | ); |
| 3068 | if (_array) { |
Thomas Tafertshofer | 2545b32 | 2012-06-27 16:33:26 -0700 | [diff] [blame^] | 3069 | releasePointer(_env, _array, params, JNI_TRUE); |
Jack Palevich | a379585 | 2009-04-24 10:35:11 -0700 | [diff] [blame] | 3070 | } |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 3071 | } |
| 3072 | |
| 3073 | static const char *classPathName = "android/opengl/GLES11Ext"; |
| 3074 | |
| 3075 | static JNINativeMethod methods[] = { |
| 3076 | {"_nativeClassInit", "()V", (void*)nativeClassInit }, |
| 3077 | {"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II }, |
| 3078 | {"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII }, |
| 3079 | {"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I }, |
| 3080 | {"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS }, |
| 3081 | {"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII }, |
| 3082 | {"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII }, |
| 3083 | {"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI }, |
| 3084 | {"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 }, |
| 3085 | {"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II }, |
| 3086 | {"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 }, |
| 3087 | {"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II }, |
| 3088 | {"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 }, |
| 3089 | {"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF }, |
| 3090 | {"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI }, |
| 3091 | {"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 }, |
| 3092 | {"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 }, |
| 3093 | {"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 }, |
| 3094 | {"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II }, |
| 3095 | {"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII }, |
| 3096 | {"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I }, |
| 3097 | {"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II }, |
| 3098 | {"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 }, |
| 3099 | {"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII }, |
| 3100 | {"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II }, |
| 3101 | {"glFogxOES", "(II)V", (void *) android_glFogxOES__II }, |
| 3102 | {"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II }, |
| 3103 | {"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 }, |
| 3104 | {"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII }, |
| 3105 | {"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II }, |
| 3106 | {"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 }, |
| 3107 | {"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II }, |
| 3108 | {"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 }, |
| 3109 | {"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II }, |
| 3110 | {"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 }, |
| 3111 | {"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II }, |
| 3112 | {"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 }, |
| 3113 | {"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II }, |
| 3114 | {"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 }, |
| 3115 | {"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II }, |
| 3116 | {"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 }, |
| 3117 | {"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II }, |
| 3118 | {"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II }, |
| 3119 | {"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 }, |
| 3120 | {"glLightxOES", "(III)V", (void *) android_glLightxOES__III }, |
| 3121 | {"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II }, |
| 3122 | {"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 }, |
| 3123 | {"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I }, |
| 3124 | {"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II }, |
| 3125 | {"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 }, |
| 3126 | {"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III }, |
| 3127 | {"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II }, |
| 3128 | {"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 }, |
| 3129 | {"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II }, |
| 3130 | {"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 }, |
| 3131 | {"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII }, |
| 3132 | {"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III }, |
| 3133 | {"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII }, |
| 3134 | {"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II }, |
| 3135 | {"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II }, |
| 3136 | {"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 }, |
| 3137 | {"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I }, |
| 3138 | {"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II }, |
| 3139 | {"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII }, |
| 3140 | {"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ }, |
| 3141 | {"glScalexOES", "(III)V", (void *) android_glScalexOES__III }, |
| 3142 | {"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III }, |
| 3143 | {"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II }, |
| 3144 | {"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 }, |
| 3145 | {"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III }, |
| 3146 | {"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II }, |
| 3147 | {"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 }, |
| 3148 | {"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III }, |
| 3149 | {"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I }, |
| 3150 | {"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II }, |
| 3151 | {"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II }, |
| 3152 | {"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 }, |
| 3153 | {"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II }, |
| 3154 | {"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 }, |
| 3155 | {"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII }, |
| 3156 | {"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II }, |
| 3157 | {"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 }, |
| 3158 | {"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I }, |
| 3159 | {"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II }, |
| 3160 | {"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II }, |
| 3161 | {"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 }, |
| 3162 | {"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II }, |
| 3163 | {"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 }, |
| 3164 | {"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I }, |
| 3165 | {"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII }, |
| 3166 | {"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII }, |
| 3167 | {"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II }, |
| 3168 | {"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 }, |
| 3169 | {"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I }, |
| 3170 | {"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I }, |
| 3171 | {"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ }, |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 3172 | {"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I }, |
| 3173 | {"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I }, |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 3174 | {"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF }, |
| 3175 | {"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF }, |
| 3176 | {"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF }, |
| 3177 | {"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI }, |
| 3178 | {"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 }, |
| 3179 | {"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI }, |
| 3180 | {"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 }, |
| 3181 | {"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F }, |
| 3182 | {"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF }, |
| 3183 | {"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI }, |
| 3184 | {"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 }, |
| 3185 | {"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III }, |
| 3186 | {"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II }, |
| 3187 | {"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 }, |
| 3188 | {"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III }, |
| 3189 | {"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II }, |
| 3190 | {"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 }, |
| 3191 | {"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI }, |
| 3192 | {"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 }, |
| 3193 | {"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II }, |
| 3194 | {"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 }, |
| 3195 | {"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II }, |
| 3196 | {"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 }, |
| 3197 | }; |
| 3198 | |
| 3199 | int register_android_opengl_jni_GLES11Ext(JNIEnv *_env) |
| 3200 | { |
| 3201 | int err; |
| 3202 | err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods)); |
| 3203 | return err; |
| 3204 | } |