The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* //device/libs/android_runtime/com_google_android_gles_jni_GLImpl.cpp |
| 2 | ** |
| 3 | ** Copyright 2006, The Android Open Source Project |
| 4 | ** |
| 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 |
| 8 | ** |
| 9 | ** http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | ** |
| 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 |
| 15 | ** limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | // This source file is automatically generated |
| 19 | |
| 20 | #include <android_runtime/AndroidRuntime.h> |
| 21 | #include <utils/misc.h> |
| 22 | |
| 23 | #include <assert.h> |
| 24 | #include <GLES/gl.h> |
Jack Palevich | be509c9 | 2009-05-07 09:52:14 -0700 | [diff] [blame] | 25 | #include <GLES/glext.h> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 26 | |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 27 | // Work around differences between the generated name and the actual name. |
| 28 | |
| 29 | #define glBlendEquation glBlendEquationOES |
| 30 | #define glBlendEquationSeparate glBlendEquationSeparateOES |
| 31 | #define glBlendFuncSeparate glBlendFuncSeparateOES |
| 32 | #define glGetTexGenfv glGetTexGenfvOES |
| 33 | #define glGetTexGeniv glGetTexGenivOES |
| 34 | #define glGetTexGenxv glGetTexGenxvOES |
| 35 | #define glTexGenf glTexGenfOES |
| 36 | #define glTexGenfv glTexGenfvOES |
| 37 | #define glTexGeni glTexGeniOES |
| 38 | #define glTexGeniv glTexGenivOES |
| 39 | #define glTexGenx glTexGenxOES |
| 40 | #define glTexGenxv glTexGenxvOES |
| 41 | |
| 42 | |
| 43 | |
Mathias Agopian | 8331f72 | 2009-05-08 15:35:17 -0700 | [diff] [blame] | 44 | /* special calls implemented in Android's GLES wrapper used to more |
| 45 | * efficiently bound-check passed arrays */ |
| 46 | extern "C" { |
| 47 | GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride, |
| 48 | const GLvoid *ptr, GLsizei count); |
| 49 | GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride, |
| 50 | const GLvoid *pointer, GLsizei count); |
| 51 | GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type, |
| 52 | GLsizei stride, const GLvoid *pointer, GLsizei count); |
| 53 | GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type, |
| 54 | GLsizei stride, const GLvoid *pointer, GLsizei count); |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 55 | GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type, |
| 56 | GLsizei stride, const GLvoid *pointer, GLsizei count); |
| 57 | GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, |
| 58 | GLsizei stride, const GLvoid *pointer, GLsizei count); |
| 59 | GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, |
| 60 | GLsizei stride, const GLvoid *pointer, GLsizei count); |
Mathias Agopian | 8331f72 | 2009-05-08 15:35:17 -0700 | [diff] [blame] | 61 | } |
| 62 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 63 | static int initialized = 0; |
| 64 | |
| 65 | static jclass nioAccessClass; |
| 66 | static jclass bufferClass; |
| 67 | static jclass OOMEClass; |
| 68 | static jclass UOEClass; |
| 69 | static jclass IAEClass; |
| 70 | static jclass AIOOBEClass; |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 71 | static jclass G11ImplClass; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 72 | static jmethodID getBasePointerID; |
| 73 | static jmethodID getBaseArrayID; |
| 74 | static jmethodID getBaseArrayOffsetID; |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 75 | static jmethodID allowIndirectBuffersID; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 76 | static jfieldID positionID; |
| 77 | static jfieldID limitID; |
| 78 | static jfieldID elementSizeShiftID; |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 79 | static jfieldID haveCheckedExtensionsID; |
| 80 | static jfieldID have_OES_blend_equation_separateID; |
| 81 | static jfieldID have_OES_blend_subtractID; |
| 82 | static jfieldID have_OES_framebuffer_objectID; |
| 83 | static jfieldID have_OES_texture_cube_mapID; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 84 | |
| 85 | /* Cache method IDs each time the class is loaded. */ |
| 86 | |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 87 | static void |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 88 | nativeClassInitBuffer(JNIEnv *_env) |
| 89 | { |
| 90 | jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); |
| 91 | nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); |
| 92 | |
| 93 | jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); |
| 94 | bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); |
| 95 | |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 96 | jclass g11impClassLocal = _env->FindClass("com/google/android/gles_jni/GLImpl"); |
| 97 | G11ImplClass = (jclass) _env->NewGlobalRef(g11impClassLocal); |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 98 | haveCheckedExtensionsID = _env->GetFieldID(G11ImplClass, "haveCheckedExtensions", "Z"); |
| 99 | have_OES_blend_equation_separateID = _env->GetFieldID(G11ImplClass, "have_OES_blend_equation_separate", "Z"); |
| 100 | have_OES_blend_subtractID = _env->GetFieldID(G11ImplClass, "have_OES_blend_subtract", "Z"); |
| 101 | have_OES_framebuffer_objectID = _env->GetFieldID(G11ImplClass, "have_OES_framebuffer_object", "Z"); |
| 102 | have_OES_texture_cube_mapID = _env->GetFieldID(G11ImplClass, "have_OES_texture_cube_map", "Z"); |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 103 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 104 | getBasePointerID = _env->GetStaticMethodID(nioAccessClass, |
| 105 | "getBasePointer", "(Ljava/nio/Buffer;)J"); |
| 106 | getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, |
| 107 | "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); |
| 108 | getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, |
| 109 | "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 110 | allowIndirectBuffersID = _env->GetStaticMethodID(g11impClassLocal, |
| 111 | "allowIndirectBuffers", "(Ljava/lang/String;)Z"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 112 | positionID = _env->GetFieldID(bufferClass, "position", "I"); |
| 113 | limitID = _env->GetFieldID(bufferClass, "limit", "I"); |
| 114 | elementSizeShiftID = |
| 115 | _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); |
| 116 | } |
| 117 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 118 | static void |
| 119 | nativeClassInit(JNIEnv *_env, jclass glImplClass) |
| 120 | { |
| 121 | nativeClassInitBuffer(_env); |
| 122 | |
| 123 | jclass IAEClassLocal = |
| 124 | _env->FindClass("java/lang/IllegalArgumentException"); |
| 125 | jclass OOMEClassLocal = |
| 126 | _env->FindClass("java/lang/OutOfMemoryError"); |
| 127 | jclass UOEClassLocal = |
| 128 | _env->FindClass("java/lang/UnsupportedOperationException"); |
| 129 | jclass AIOOBEClassLocal = |
| 130 | _env->FindClass("java/lang/ArrayIndexOutOfBoundsException"); |
| 131 | |
| 132 | IAEClass = (jclass) _env->NewGlobalRef(IAEClassLocal); |
| 133 | OOMEClass = (jclass) _env->NewGlobalRef(OOMEClassLocal); |
| 134 | UOEClass = (jclass) _env->NewGlobalRef(UOEClassLocal); |
| 135 | AIOOBEClass = (jclass) _env->NewGlobalRef(AIOOBEClassLocal); |
| 136 | } |
| 137 | |
| 138 | static void * |
| 139 | getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining) |
| 140 | { |
| 141 | jint position; |
| 142 | jint limit; |
| 143 | jint elementSizeShift; |
| 144 | jlong pointer; |
| 145 | jint offset; |
| 146 | void *data; |
| 147 | |
| 148 | position = _env->GetIntField(buffer, positionID); |
| 149 | limit = _env->GetIntField(buffer, limitID); |
| 150 | elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); |
| 151 | *remaining = (limit - position) << elementSizeShift; |
| 152 | pointer = _env->CallStaticLongMethod(nioAccessClass, |
| 153 | getBasePointerID, buffer); |
| 154 | if (pointer != 0L) { |
| 155 | *array = NULL; |
| 156 | return (void *) (jint) pointer; |
| 157 | } |
| 158 | |
| 159 | *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, |
| 160 | getBaseArrayID, buffer); |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 161 | if (*array == NULL) { |
| 162 | return (void*) NULL; |
| 163 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 164 | offset = _env->CallStaticIntMethod(nioAccessClass, |
| 165 | getBaseArrayOffsetID, buffer); |
| 166 | data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0); |
| 167 | |
| 168 | return (void *) ((char *) data + offset); |
| 169 | } |
| 170 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 171 | static void |
| 172 | releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) |
| 173 | { |
| 174 | _env->ReleasePrimitiveArrayCritical(array, data, |
| 175 | commit ? 0 : JNI_ABORT); |
| 176 | } |
| 177 | |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 178 | extern "C" { |
| 179 | extern char* __progname; |
| 180 | } |
| 181 | |
| 182 | static bool |
| 183 | allowIndirectBuffers(JNIEnv *_env) { |
| 184 | static jint sIndirectBufferCompatability; |
| 185 | if (sIndirectBufferCompatability == 0) { |
| 186 | jobject appName = _env->NewStringUTF(::__progname); |
| 187 | sIndirectBufferCompatability = _env->CallStaticBooleanMethod(G11ImplClass, allowIndirectBuffersID, appName) ? 2 : 1; |
| 188 | } |
| 189 | return sIndirectBufferCompatability == 2; |
| 190 | } |
| 191 | |
Jack Palevich | 16e7972 | 2009-05-15 18:13:34 -0700 | [diff] [blame] | 192 | static void * |
| 193 | getDirectBufferPointer(JNIEnv *_env, jobject buffer) { |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 194 | if (!buffer) { |
| 195 | return NULL; |
| 196 | } |
| 197 | void* buf = _env->GetDirectBufferAddress(buffer); |
Jack Palevich | 16e7972 | 2009-05-15 18:13:34 -0700 | [diff] [blame] | 198 | if (buf) { |
| 199 | jint position = _env->GetIntField(buffer, positionID); |
| 200 | jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 201 | buf = ((char*) buf) + (position << elementSizeShift); |
Jack Palevich | 16e7972 | 2009-05-15 18:13:34 -0700 | [diff] [blame] | 202 | } else { |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 203 | if (allowIndirectBuffers(_env)) { |
| 204 | jarray array = 0; |
| 205 | jint remaining; |
| 206 | buf = getPointer(_env, buffer, &array, &remaining); |
| 207 | if (array) { |
| 208 | releasePointer(_env, array, buf, 0); |
| 209 | } |
| 210 | } else { |
| 211 | _env->ThrowNew(IAEClass, "Must use a native order direct Buffer"); |
| 212 | } |
Jack Palevich | 16e7972 | 2009-05-15 18:13:34 -0700 | [diff] [blame] | 213 | } |
Jack Palevich | 91a27ae | 2009-06-15 21:03:24 -0700 | [diff] [blame] | 214 | return buf; |
Jack Palevich | 16e7972 | 2009-05-15 18:13:34 -0700 | [diff] [blame] | 215 | } |
| 216 | |
Jack Palevich | be509c9 | 2009-05-07 09:52:14 -0700 | [diff] [blame] | 217 | static int |
| 218 | getNumCompressedTextureFormats() { |
| 219 | int numCompressedTextureFormats = 0; |
| 220 | glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats); |
| 221 | return numCompressedTextureFormats; |
| 222 | } |
| 223 | |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 224 | // Check if the extension at the head of pExtensions is pExtension. Note that pExtensions is |
| 225 | // terminated by either 0 or space, while pExtension is terminated by 0. |
| 226 | |
| 227 | static bool |
| 228 | extensionEqual(const GLubyte* pExtensions, const GLubyte* pExtension) { |
| 229 | while (true) { |
| 230 | char a = *pExtensions++; |
| 231 | char b = *pExtension++; |
| 232 | bool aEnd = a == '\0' || a == ' '; |
| 233 | bool bEnd = b == '\0'; |
| 234 | if ( aEnd || bEnd) { |
| 235 | return aEnd == bEnd; |
| 236 | } |
| 237 | if ( a != b ) { |
| 238 | return false; |
| 239 | } |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | static const GLubyte* |
| 244 | nextExtension(const GLubyte* pExtensions) { |
| 245 | while (true) { |
| 246 | char a = *pExtensions++; |
| 247 | if ( a == '\0') { |
| 248 | return pExtensions-1; |
| 249 | } else if ( a == ' ') { |
| 250 | return pExtensions; |
| 251 | } |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | static bool |
| 256 | checkForExtension(const GLubyte* pExtensions, const GLubyte* pExtension) { |
| 257 | for (;*pExtensions != '\0'; pExtensions = nextExtension(pExtensions)) { |
| 258 | if (extensionEqual(pExtensions, pExtension)) { |
| 259 | return true; |
| 260 | } |
| 261 | } |
| 262 | return false; |
| 263 | } |
| 264 | |
| 265 | static bool |
| 266 | supportsExtension(JNIEnv *_env, jobject impl, jfieldID fieldId) { |
| 267 | if (!_env->GetBooleanField(impl, haveCheckedExtensionsID)) { |
| 268 | _env->SetBooleanField(impl, haveCheckedExtensionsID, true); |
| 269 | const GLubyte* sExtensions = glGetString(GL_EXTENSIONS); |
| 270 | _env->SetBooleanField(impl, have_OES_blend_equation_separateID, |
| 271 | checkForExtension(sExtensions, (const GLubyte*) "GL_OES_blend_equation_separate")); |
| 272 | _env->SetBooleanField(impl, have_OES_blend_subtractID, |
| 273 | checkForExtension(sExtensions, (const GLubyte*) "GL_OES_blend_subtract")); |
| 274 | _env->SetBooleanField(impl, have_OES_framebuffer_objectID, |
| 275 | checkForExtension(sExtensions, (const GLubyte*) "GL_OES_framebuffer_object")); |
| 276 | _env->SetBooleanField(impl, have_OES_texture_cube_mapID, |
| 277 | checkForExtension(sExtensions, (const GLubyte*) "GL_OES_texture_cube_map")); |
| 278 | } |
| 279 | return _env->GetBooleanField(impl, fieldId); |
| 280 | } |
| 281 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 282 | // -------------------------------------------------------------------------- |
| 283 | |
| 284 | /* void glActiveTexture ( GLenum texture ) */ |
| 285 | static void |
| 286 | android_glActiveTexture__I |
| 287 | (JNIEnv *_env, jobject _this, jint texture) { |
| 288 | glActiveTexture( |
| 289 | (GLenum)texture |
| 290 | ); |
| 291 | } |
| 292 | |
| 293 | /* void glAlphaFunc ( GLenum func, GLclampf ref ) */ |
| 294 | static void |
| 295 | android_glAlphaFunc__IF |
| 296 | (JNIEnv *_env, jobject _this, jint func, jfloat ref) { |
| 297 | glAlphaFunc( |
| 298 | (GLenum)func, |
| 299 | (GLclampf)ref |
| 300 | ); |
| 301 | } |
| 302 | |
| 303 | /* void glAlphaFuncx ( GLenum func, GLclampx ref ) */ |
| 304 | static void |
| 305 | android_glAlphaFuncx__II |
| 306 | (JNIEnv *_env, jobject _this, jint func, jint ref) { |
| 307 | glAlphaFuncx( |
| 308 | (GLenum)func, |
| 309 | (GLclampx)ref |
| 310 | ); |
| 311 | } |
| 312 | |
| 313 | /* void glBindTexture ( GLenum target, GLuint texture ) */ |
| 314 | static void |
| 315 | android_glBindTexture__II |
| 316 | (JNIEnv *_env, jobject _this, jint target, jint texture) { |
| 317 | glBindTexture( |
| 318 | (GLenum)target, |
| 319 | (GLuint)texture |
| 320 | ); |
| 321 | } |
| 322 | |
| 323 | /* void glBlendFunc ( GLenum sfactor, GLenum dfactor ) */ |
| 324 | static void |
| 325 | android_glBlendFunc__II |
| 326 | (JNIEnv *_env, jobject _this, jint sfactor, jint dfactor) { |
| 327 | glBlendFunc( |
| 328 | (GLenum)sfactor, |
| 329 | (GLenum)dfactor |
| 330 | ); |
| 331 | } |
| 332 | |
| 333 | /* void glClear ( GLbitfield mask ) */ |
| 334 | static void |
| 335 | android_glClear__I |
| 336 | (JNIEnv *_env, jobject _this, jint mask) { |
| 337 | glClear( |
| 338 | (GLbitfield)mask |
| 339 | ); |
| 340 | } |
| 341 | |
| 342 | /* void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) */ |
| 343 | static void |
| 344 | android_glClearColor__FFFF |
| 345 | (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) { |
| 346 | glClearColor( |
| 347 | (GLclampf)red, |
| 348 | (GLclampf)green, |
| 349 | (GLclampf)blue, |
| 350 | (GLclampf)alpha |
| 351 | ); |
| 352 | } |
| 353 | |
| 354 | /* void glClearColorx ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */ |
| 355 | static void |
| 356 | android_glClearColorx__IIII |
| 357 | (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) { |
| 358 | glClearColorx( |
| 359 | (GLclampx)red, |
| 360 | (GLclampx)green, |
| 361 | (GLclampx)blue, |
| 362 | (GLclampx)alpha |
| 363 | ); |
| 364 | } |
| 365 | |
| 366 | /* void glClearDepthf ( GLclampf depth ) */ |
| 367 | static void |
| 368 | android_glClearDepthf__F |
| 369 | (JNIEnv *_env, jobject _this, jfloat depth) { |
| 370 | glClearDepthf( |
| 371 | (GLclampf)depth |
| 372 | ); |
| 373 | } |
| 374 | |
| 375 | /* void glClearDepthx ( GLclampx depth ) */ |
| 376 | static void |
| 377 | android_glClearDepthx__I |
| 378 | (JNIEnv *_env, jobject _this, jint depth) { |
| 379 | glClearDepthx( |
| 380 | (GLclampx)depth |
| 381 | ); |
| 382 | } |
| 383 | |
| 384 | /* void glClearStencil ( GLint s ) */ |
| 385 | static void |
| 386 | android_glClearStencil__I |
| 387 | (JNIEnv *_env, jobject _this, jint s) { |
| 388 | glClearStencil( |
| 389 | (GLint)s |
| 390 | ); |
| 391 | } |
| 392 | |
| 393 | /* void glClientActiveTexture ( GLenum texture ) */ |
| 394 | static void |
| 395 | android_glClientActiveTexture__I |
| 396 | (JNIEnv *_env, jobject _this, jint texture) { |
| 397 | glClientActiveTexture( |
| 398 | (GLenum)texture |
| 399 | ); |
| 400 | } |
| 401 | |
| 402 | /* void glColor4f ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) */ |
| 403 | static void |
| 404 | android_glColor4f__FFFF |
| 405 | (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) { |
| 406 | glColor4f( |
| 407 | (GLfloat)red, |
| 408 | (GLfloat)green, |
| 409 | (GLfloat)blue, |
| 410 | (GLfloat)alpha |
| 411 | ); |
| 412 | } |
| 413 | |
| 414 | /* void glColor4x ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */ |
| 415 | static void |
| 416 | android_glColor4x__IIII |
| 417 | (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) { |
| 418 | glColor4x( |
| 419 | (GLfixed)red, |
| 420 | (GLfixed)green, |
| 421 | (GLfixed)blue, |
| 422 | (GLfixed)alpha |
| 423 | ); |
| 424 | } |
| 425 | |
| 426 | /* void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) */ |
| 427 | static void |
| 428 | android_glColorMask__ZZZZ |
| 429 | (JNIEnv *_env, jobject _this, jboolean red, jboolean green, jboolean blue, jboolean alpha) { |
| 430 | glColorMask( |
| 431 | (GLboolean)red, |
| 432 | (GLboolean)green, |
| 433 | (GLboolean)blue, |
| 434 | (GLboolean)alpha |
| 435 | ); |
| 436 | } |
| 437 | |
| 438 | /* void glColorPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */ |
| 439 | static void |
| 440 | android_glColorPointerBounds__IIILjava_nio_Buffer_2I |
| 441 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) { |
| 442 | jarray _array = (jarray) 0; |
| 443 | jint _remaining; |
| 444 | GLvoid *pointer = (GLvoid *) 0; |
| 445 | |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 446 | if (pointer_buf) { |
Jack Palevich | 16e7972 | 2009-05-15 18:13:34 -0700 | [diff] [blame] | 447 | pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 448 | if ( ! pointer ) { |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 449 | return; |
| 450 | } |
| 451 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 452 | glColorPointerBounds( |
| 453 | (GLint)size, |
| 454 | (GLenum)type, |
| 455 | (GLsizei)stride, |
| 456 | (GLvoid *)pointer, |
| 457 | (GLsizei)remaining |
| 458 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 459 | } |
| 460 | |
| 461 | /* void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ) */ |
| 462 | static void |
| 463 | android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 |
| 464 | (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) { |
| 465 | jarray _array = (jarray) 0; |
| 466 | jint _remaining; |
| 467 | GLvoid *data = (GLvoid *) 0; |
| 468 | |
| 469 | data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); |
| 470 | glCompressedTexImage2D( |
| 471 | (GLenum)target, |
| 472 | (GLint)level, |
| 473 | (GLenum)internalformat, |
| 474 | (GLsizei)width, |
| 475 | (GLsizei)height, |
| 476 | (GLint)border, |
| 477 | (GLsizei)imageSize, |
| 478 | (GLvoid *)data |
| 479 | ); |
| 480 | if (_array) { |
| 481 | releasePointer(_env, _array, data, JNI_FALSE); |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | /* void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) */ |
| 486 | static void |
| 487 | android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 |
| 488 | (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) { |
| 489 | jarray _array = (jarray) 0; |
| 490 | jint _remaining; |
| 491 | GLvoid *data = (GLvoid *) 0; |
| 492 | |
| 493 | data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); |
| 494 | glCompressedTexSubImage2D( |
| 495 | (GLenum)target, |
| 496 | (GLint)level, |
| 497 | (GLint)xoffset, |
| 498 | (GLint)yoffset, |
| 499 | (GLsizei)width, |
| 500 | (GLsizei)height, |
| 501 | (GLenum)format, |
| 502 | (GLsizei)imageSize, |
| 503 | (GLvoid *)data |
| 504 | ); |
| 505 | if (_array) { |
| 506 | releasePointer(_env, _array, data, JNI_FALSE); |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | /* void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) */ |
| 511 | static void |
| 512 | android_glCopyTexImage2D__IIIIIIII |
| 513 | (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border) { |
| 514 | glCopyTexImage2D( |
| 515 | (GLenum)target, |
| 516 | (GLint)level, |
| 517 | (GLenum)internalformat, |
| 518 | (GLint)x, |
| 519 | (GLint)y, |
| 520 | (GLsizei)width, |
| 521 | (GLsizei)height, |
| 522 | (GLint)border |
| 523 | ); |
| 524 | } |
| 525 | |
| 526 | /* void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */ |
| 527 | static void |
| 528 | android_glCopyTexSubImage2D__IIIIIIII |
| 529 | (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) { |
| 530 | glCopyTexSubImage2D( |
| 531 | (GLenum)target, |
| 532 | (GLint)level, |
| 533 | (GLint)xoffset, |
| 534 | (GLint)yoffset, |
| 535 | (GLint)x, |
| 536 | (GLint)y, |
| 537 | (GLsizei)width, |
| 538 | (GLsizei)height |
| 539 | ); |
| 540 | } |
| 541 | |
| 542 | /* void glCullFace ( GLenum mode ) */ |
| 543 | static void |
| 544 | android_glCullFace__I |
| 545 | (JNIEnv *_env, jobject _this, jint mode) { |
| 546 | glCullFace( |
| 547 | (GLenum)mode |
| 548 | ); |
| 549 | } |
| 550 | |
| 551 | /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */ |
| 552 | static void |
| 553 | android_glDeleteTextures__I_3II |
| 554 | (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) { |
| 555 | GLuint *textures_base = (GLuint *) 0; |
| 556 | jint _remaining; |
| 557 | GLuint *textures = (GLuint *) 0; |
| 558 | |
| 559 | if (!textures_ref) { |
| 560 | _env->ThrowNew(IAEClass, "textures == null"); |
| 561 | goto exit; |
| 562 | } |
| 563 | if (offset < 0) { |
| 564 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 565 | goto exit; |
| 566 | } |
| 567 | _remaining = _env->GetArrayLength(textures_ref) - offset; |
| 568 | if (_remaining < n) { |
| 569 | _env->ThrowNew(IAEClass, "length - offset < n"); |
| 570 | goto exit; |
| 571 | } |
| 572 | textures_base = (GLuint *) |
| 573 | _env->GetPrimitiveArrayCritical(textures_ref, (jboolean *)0); |
| 574 | textures = textures_base + offset; |
| 575 | |
| 576 | glDeleteTextures( |
| 577 | (GLsizei)n, |
| 578 | (GLuint *)textures |
| 579 | ); |
| 580 | |
| 581 | exit: |
| 582 | if (textures_base) { |
| 583 | _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base, |
| 584 | JNI_ABORT); |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */ |
| 589 | static void |
| 590 | android_glDeleteTextures__ILjava_nio_IntBuffer_2 |
| 591 | (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) { |
| 592 | jarray _array = (jarray) 0; |
| 593 | jint _remaining; |
| 594 | GLuint *textures = (GLuint *) 0; |
| 595 | |
| 596 | textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining); |
| 597 | if (_remaining < n) { |
| 598 | _env->ThrowNew(IAEClass, "remaining() < n"); |
| 599 | goto exit; |
| 600 | } |
| 601 | glDeleteTextures( |
| 602 | (GLsizei)n, |
| 603 | (GLuint *)textures |
| 604 | ); |
| 605 | |
| 606 | exit: |
| 607 | if (_array) { |
| 608 | releasePointer(_env, _array, textures, JNI_FALSE); |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | /* void glDepthFunc ( GLenum func ) */ |
| 613 | static void |
| 614 | android_glDepthFunc__I |
| 615 | (JNIEnv *_env, jobject _this, jint func) { |
| 616 | glDepthFunc( |
| 617 | (GLenum)func |
| 618 | ); |
| 619 | } |
| 620 | |
| 621 | /* void glDepthMask ( GLboolean flag ) */ |
| 622 | static void |
| 623 | android_glDepthMask__Z |
| 624 | (JNIEnv *_env, jobject _this, jboolean flag) { |
| 625 | glDepthMask( |
| 626 | (GLboolean)flag |
| 627 | ); |
| 628 | } |
| 629 | |
| 630 | /* void glDepthRangef ( GLclampf zNear, GLclampf zFar ) */ |
| 631 | static void |
| 632 | android_glDepthRangef__FF |
| 633 | (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) { |
| 634 | glDepthRangef( |
| 635 | (GLclampf)zNear, |
| 636 | (GLclampf)zFar |
| 637 | ); |
| 638 | } |
| 639 | |
| 640 | /* void glDepthRangex ( GLclampx zNear, GLclampx zFar ) */ |
| 641 | static void |
| 642 | android_glDepthRangex__II |
| 643 | (JNIEnv *_env, jobject _this, jint zNear, jint zFar) { |
| 644 | glDepthRangex( |
| 645 | (GLclampx)zNear, |
| 646 | (GLclampx)zFar |
| 647 | ); |
| 648 | } |
| 649 | |
| 650 | /* void glDisable ( GLenum cap ) */ |
| 651 | static void |
| 652 | android_glDisable__I |
| 653 | (JNIEnv *_env, jobject _this, jint cap) { |
| 654 | glDisable( |
| 655 | (GLenum)cap |
| 656 | ); |
| 657 | } |
| 658 | |
| 659 | /* void glDisableClientState ( GLenum array ) */ |
| 660 | static void |
| 661 | android_glDisableClientState__I |
| 662 | (JNIEnv *_env, jobject _this, jint array) { |
| 663 | glDisableClientState( |
| 664 | (GLenum)array |
| 665 | ); |
| 666 | } |
| 667 | |
| 668 | /* void glDrawArrays ( GLenum mode, GLint first, GLsizei count ) */ |
| 669 | static void |
| 670 | android_glDrawArrays__III |
| 671 | (JNIEnv *_env, jobject _this, jint mode, jint first, jint count) { |
| 672 | glDrawArrays( |
| 673 | (GLenum)mode, |
| 674 | (GLint)first, |
| 675 | (GLsizei)count |
| 676 | ); |
| 677 | } |
| 678 | |
| 679 | /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */ |
| 680 | static void |
| 681 | android_glDrawElements__IIILjava_nio_Buffer_2 |
| 682 | (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) { |
| 683 | jarray _array = (jarray) 0; |
| 684 | jint _remaining; |
| 685 | GLvoid *indices = (GLvoid *) 0; |
| 686 | |
| 687 | indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining); |
| 688 | if (_remaining < count) { |
| 689 | _env->ThrowNew(AIOOBEClass, "remaining() < count"); |
| 690 | goto exit; |
| 691 | } |
| 692 | glDrawElements( |
| 693 | (GLenum)mode, |
| 694 | (GLsizei)count, |
| 695 | (GLenum)type, |
| 696 | (GLvoid *)indices |
| 697 | ); |
| 698 | |
| 699 | exit: |
| 700 | if (_array) { |
| 701 | releasePointer(_env, _array, indices, JNI_FALSE); |
| 702 | } |
| 703 | } |
| 704 | |
| 705 | /* void glEnable ( GLenum cap ) */ |
| 706 | static void |
| 707 | android_glEnable__I |
| 708 | (JNIEnv *_env, jobject _this, jint cap) { |
| 709 | glEnable( |
| 710 | (GLenum)cap |
| 711 | ); |
| 712 | } |
| 713 | |
| 714 | /* void glEnableClientState ( GLenum array ) */ |
| 715 | static void |
| 716 | android_glEnableClientState__I |
| 717 | (JNIEnv *_env, jobject _this, jint array) { |
| 718 | glEnableClientState( |
| 719 | (GLenum)array |
| 720 | ); |
| 721 | } |
| 722 | |
| 723 | /* void glFinish ( void ) */ |
| 724 | static void |
| 725 | android_glFinish__ |
| 726 | (JNIEnv *_env, jobject _this) { |
| 727 | glFinish(); |
| 728 | } |
| 729 | |
| 730 | /* void glFlush ( void ) */ |
| 731 | static void |
| 732 | android_glFlush__ |
| 733 | (JNIEnv *_env, jobject _this) { |
| 734 | glFlush(); |
| 735 | } |
| 736 | |
| 737 | /* void glFogf ( GLenum pname, GLfloat param ) */ |
| 738 | static void |
| 739 | android_glFogf__IF |
| 740 | (JNIEnv *_env, jobject _this, jint pname, jfloat param) { |
| 741 | glFogf( |
| 742 | (GLenum)pname, |
| 743 | (GLfloat)param |
| 744 | ); |
| 745 | } |
| 746 | |
| 747 | /* void glFogfv ( GLenum pname, const GLfloat *params ) */ |
| 748 | static void |
| 749 | android_glFogfv__I_3FI |
| 750 | (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { |
| 751 | GLfloat *params_base = (GLfloat *) 0; |
| 752 | jint _remaining; |
| 753 | GLfloat *params = (GLfloat *) 0; |
| 754 | |
| 755 | if (!params_ref) { |
| 756 | _env->ThrowNew(IAEClass, "params == null"); |
| 757 | goto exit; |
| 758 | } |
| 759 | if (offset < 0) { |
| 760 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 761 | goto exit; |
| 762 | } |
| 763 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 764 | int _needed; |
| 765 | switch (pname) { |
| 766 | #if defined(GL_FOG_MODE) |
| 767 | case GL_FOG_MODE: |
| 768 | #endif // defined(GL_FOG_MODE) |
| 769 | #if defined(GL_FOG_DENSITY) |
| 770 | case GL_FOG_DENSITY: |
| 771 | #endif // defined(GL_FOG_DENSITY) |
| 772 | #if defined(GL_FOG_START) |
| 773 | case GL_FOG_START: |
| 774 | #endif // defined(GL_FOG_START) |
| 775 | #if defined(GL_FOG_END) |
| 776 | case GL_FOG_END: |
| 777 | #endif // defined(GL_FOG_END) |
| 778 | _needed = 1; |
| 779 | break; |
| 780 | #if defined(GL_FOG_COLOR) |
| 781 | case GL_FOG_COLOR: |
| 782 | #endif // defined(GL_FOG_COLOR) |
| 783 | _needed = 4; |
| 784 | break; |
| 785 | default: |
| 786 | _needed = 0; |
| 787 | break; |
| 788 | } |
| 789 | if (_remaining < _needed) { |
| 790 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 791 | goto exit; |
| 792 | } |
| 793 | params_base = (GLfloat *) |
| 794 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 795 | params = params_base + offset; |
| 796 | |
| 797 | glFogfv( |
| 798 | (GLenum)pname, |
| 799 | (GLfloat *)params |
| 800 | ); |
| 801 | |
| 802 | exit: |
| 803 | if (params_base) { |
| 804 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 805 | JNI_ABORT); |
| 806 | } |
| 807 | } |
| 808 | |
| 809 | /* void glFogfv ( GLenum pname, const GLfloat *params ) */ |
| 810 | static void |
| 811 | android_glFogfv__ILjava_nio_FloatBuffer_2 |
| 812 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 813 | jarray _array = (jarray) 0; |
| 814 | jint _remaining; |
| 815 | GLfloat *params = (GLfloat *) 0; |
| 816 | |
| 817 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 818 | int _needed; |
| 819 | switch (pname) { |
| 820 | #if defined(GL_FOG_MODE) |
| 821 | case GL_FOG_MODE: |
| 822 | #endif // defined(GL_FOG_MODE) |
| 823 | #if defined(GL_FOG_DENSITY) |
| 824 | case GL_FOG_DENSITY: |
| 825 | #endif // defined(GL_FOG_DENSITY) |
| 826 | #if defined(GL_FOG_START) |
| 827 | case GL_FOG_START: |
| 828 | #endif // defined(GL_FOG_START) |
| 829 | #if defined(GL_FOG_END) |
| 830 | case GL_FOG_END: |
| 831 | #endif // defined(GL_FOG_END) |
| 832 | _needed = 1; |
| 833 | break; |
| 834 | #if defined(GL_FOG_COLOR) |
| 835 | case GL_FOG_COLOR: |
| 836 | #endif // defined(GL_FOG_COLOR) |
| 837 | _needed = 4; |
| 838 | break; |
| 839 | default: |
| 840 | _needed = 0; |
| 841 | break; |
| 842 | } |
| 843 | if (_remaining < _needed) { |
| 844 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 845 | goto exit; |
| 846 | } |
| 847 | glFogfv( |
| 848 | (GLenum)pname, |
| 849 | (GLfloat *)params |
| 850 | ); |
| 851 | |
| 852 | exit: |
| 853 | if (_array) { |
| 854 | releasePointer(_env, _array, params, JNI_FALSE); |
| 855 | } |
| 856 | } |
| 857 | |
| 858 | /* void glFogx ( GLenum pname, GLfixed param ) */ |
| 859 | static void |
| 860 | android_glFogx__II |
| 861 | (JNIEnv *_env, jobject _this, jint pname, jint param) { |
| 862 | glFogx( |
| 863 | (GLenum)pname, |
| 864 | (GLfixed)param |
| 865 | ); |
| 866 | } |
| 867 | |
| 868 | /* void glFogxv ( GLenum pname, const GLfixed *params ) */ |
| 869 | static void |
| 870 | android_glFogxv__I_3II |
| 871 | (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { |
| 872 | GLfixed *params_base = (GLfixed *) 0; |
| 873 | jint _remaining; |
| 874 | GLfixed *params = (GLfixed *) 0; |
| 875 | |
| 876 | if (!params_ref) { |
| 877 | _env->ThrowNew(IAEClass, "params == null"); |
| 878 | goto exit; |
| 879 | } |
| 880 | if (offset < 0) { |
| 881 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 882 | goto exit; |
| 883 | } |
| 884 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 885 | int _needed; |
| 886 | switch (pname) { |
| 887 | #if defined(GL_FOG_MODE) |
| 888 | case GL_FOG_MODE: |
| 889 | #endif // defined(GL_FOG_MODE) |
| 890 | #if defined(GL_FOG_DENSITY) |
| 891 | case GL_FOG_DENSITY: |
| 892 | #endif // defined(GL_FOG_DENSITY) |
| 893 | #if defined(GL_FOG_START) |
| 894 | case GL_FOG_START: |
| 895 | #endif // defined(GL_FOG_START) |
| 896 | #if defined(GL_FOG_END) |
| 897 | case GL_FOG_END: |
| 898 | #endif // defined(GL_FOG_END) |
| 899 | _needed = 1; |
| 900 | break; |
| 901 | #if defined(GL_FOG_COLOR) |
| 902 | case GL_FOG_COLOR: |
| 903 | #endif // defined(GL_FOG_COLOR) |
| 904 | _needed = 4; |
| 905 | break; |
| 906 | default: |
| 907 | _needed = 0; |
| 908 | break; |
| 909 | } |
| 910 | if (_remaining < _needed) { |
| 911 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 912 | goto exit; |
| 913 | } |
| 914 | params_base = (GLfixed *) |
| 915 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 916 | params = params_base + offset; |
| 917 | |
| 918 | glFogxv( |
| 919 | (GLenum)pname, |
| 920 | (GLfixed *)params |
| 921 | ); |
| 922 | |
| 923 | exit: |
| 924 | if (params_base) { |
| 925 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 926 | JNI_ABORT); |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | /* void glFogxv ( GLenum pname, const GLfixed *params ) */ |
| 931 | static void |
| 932 | android_glFogxv__ILjava_nio_IntBuffer_2 |
| 933 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 934 | jarray _array = (jarray) 0; |
| 935 | jint _remaining; |
| 936 | GLfixed *params = (GLfixed *) 0; |
| 937 | |
| 938 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 939 | int _needed; |
| 940 | switch (pname) { |
| 941 | #if defined(GL_FOG_MODE) |
| 942 | case GL_FOG_MODE: |
| 943 | #endif // defined(GL_FOG_MODE) |
| 944 | #if defined(GL_FOG_DENSITY) |
| 945 | case GL_FOG_DENSITY: |
| 946 | #endif // defined(GL_FOG_DENSITY) |
| 947 | #if defined(GL_FOG_START) |
| 948 | case GL_FOG_START: |
| 949 | #endif // defined(GL_FOG_START) |
| 950 | #if defined(GL_FOG_END) |
| 951 | case GL_FOG_END: |
| 952 | #endif // defined(GL_FOG_END) |
| 953 | _needed = 1; |
| 954 | break; |
| 955 | #if defined(GL_FOG_COLOR) |
| 956 | case GL_FOG_COLOR: |
| 957 | #endif // defined(GL_FOG_COLOR) |
| 958 | _needed = 4; |
| 959 | break; |
| 960 | default: |
| 961 | _needed = 0; |
| 962 | break; |
| 963 | } |
| 964 | if (_remaining < _needed) { |
| 965 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 966 | goto exit; |
| 967 | } |
| 968 | glFogxv( |
| 969 | (GLenum)pname, |
| 970 | (GLfixed *)params |
| 971 | ); |
| 972 | |
| 973 | exit: |
| 974 | if (_array) { |
| 975 | releasePointer(_env, _array, params, JNI_FALSE); |
| 976 | } |
| 977 | } |
| 978 | |
| 979 | /* void glFrontFace ( GLenum mode ) */ |
| 980 | static void |
| 981 | android_glFrontFace__I |
| 982 | (JNIEnv *_env, jobject _this, jint mode) { |
| 983 | glFrontFace( |
| 984 | (GLenum)mode |
| 985 | ); |
| 986 | } |
| 987 | |
| 988 | /* void glFrustumf ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */ |
| 989 | static void |
| 990 | android_glFrustumf__FFFFFF |
| 991 | (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) { |
| 992 | glFrustumf( |
| 993 | (GLfloat)left, |
| 994 | (GLfloat)right, |
| 995 | (GLfloat)bottom, |
| 996 | (GLfloat)top, |
| 997 | (GLfloat)zNear, |
| 998 | (GLfloat)zFar |
| 999 | ); |
| 1000 | } |
| 1001 | |
| 1002 | /* void glFrustumx ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */ |
| 1003 | static void |
| 1004 | android_glFrustumx__IIIIII |
| 1005 | (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) { |
| 1006 | glFrustumx( |
| 1007 | (GLfixed)left, |
| 1008 | (GLfixed)right, |
| 1009 | (GLfixed)bottom, |
| 1010 | (GLfixed)top, |
| 1011 | (GLfixed)zNear, |
| 1012 | (GLfixed)zFar |
| 1013 | ); |
| 1014 | } |
| 1015 | |
| 1016 | /* void glGenTextures ( GLsizei n, GLuint *textures ) */ |
| 1017 | static void |
| 1018 | android_glGenTextures__I_3II |
| 1019 | (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) { |
| 1020 | jint _exception = 0; |
| 1021 | GLuint *textures_base = (GLuint *) 0; |
| 1022 | jint _remaining; |
| 1023 | GLuint *textures = (GLuint *) 0; |
| 1024 | |
| 1025 | if (!textures_ref) { |
| 1026 | _exception = 1; |
| 1027 | _env->ThrowNew(IAEClass, "textures == null"); |
| 1028 | goto exit; |
| 1029 | } |
| 1030 | if (offset < 0) { |
| 1031 | _exception = 1; |
| 1032 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 1033 | goto exit; |
| 1034 | } |
| 1035 | _remaining = _env->GetArrayLength(textures_ref) - offset; |
| 1036 | if (_remaining < n) { |
| 1037 | _exception = 1; |
| 1038 | _env->ThrowNew(IAEClass, "length - offset < n"); |
| 1039 | goto exit; |
| 1040 | } |
| 1041 | textures_base = (GLuint *) |
| 1042 | _env->GetPrimitiveArrayCritical(textures_ref, (jboolean *)0); |
| 1043 | textures = textures_base + offset; |
| 1044 | |
| 1045 | glGenTextures( |
| 1046 | (GLsizei)n, |
| 1047 | (GLuint *)textures |
| 1048 | ); |
| 1049 | |
| 1050 | exit: |
| 1051 | if (textures_base) { |
| 1052 | _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base, |
| 1053 | _exception ? JNI_ABORT: 0); |
| 1054 | } |
| 1055 | } |
| 1056 | |
| 1057 | /* void glGenTextures ( GLsizei n, GLuint *textures ) */ |
| 1058 | static void |
| 1059 | android_glGenTextures__ILjava_nio_IntBuffer_2 |
| 1060 | (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) { |
| 1061 | jint _exception = 0; |
| 1062 | jarray _array = (jarray) 0; |
| 1063 | jint _remaining; |
| 1064 | GLuint *textures = (GLuint *) 0; |
| 1065 | |
| 1066 | textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining); |
| 1067 | if (_remaining < n) { |
| 1068 | _exception = 1; |
| 1069 | _env->ThrowNew(IAEClass, "remaining() < n"); |
| 1070 | goto exit; |
| 1071 | } |
| 1072 | glGenTextures( |
| 1073 | (GLsizei)n, |
| 1074 | (GLuint *)textures |
| 1075 | ); |
| 1076 | |
| 1077 | exit: |
| 1078 | if (_array) { |
| 1079 | releasePointer(_env, _array, textures, _exception ? JNI_FALSE : JNI_TRUE); |
| 1080 | } |
| 1081 | } |
| 1082 | |
| 1083 | /* GLenum glGetError ( void ) */ |
| 1084 | static jint |
| 1085 | android_glGetError__ |
| 1086 | (JNIEnv *_env, jobject _this) { |
| 1087 | GLenum _returnValue; |
| 1088 | _returnValue = glGetError(); |
| 1089 | return _returnValue; |
| 1090 | } |
| 1091 | |
| 1092 | /* void glGetIntegerv ( GLenum pname, GLint *params ) */ |
| 1093 | static void |
| 1094 | android_glGetIntegerv__I_3II |
| 1095 | (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { |
| 1096 | jint _exception = 0; |
| 1097 | GLint *params_base = (GLint *) 0; |
| 1098 | jint _remaining; |
| 1099 | GLint *params = (GLint *) 0; |
| 1100 | |
| 1101 | if (!params_ref) { |
| 1102 | _exception = 1; |
| 1103 | _env->ThrowNew(IAEClass, "params == null"); |
| 1104 | goto exit; |
| 1105 | } |
| 1106 | if (offset < 0) { |
| 1107 | _exception = 1; |
| 1108 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 1109 | goto exit; |
| 1110 | } |
| 1111 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1112 | int _needed; |
| 1113 | switch (pname) { |
| 1114 | #if defined(GL_ALPHA_BITS) |
| 1115 | case GL_ALPHA_BITS: |
| 1116 | #endif // defined(GL_ALPHA_BITS) |
| 1117 | #if defined(GL_ALPHA_TEST_FUNC) |
| 1118 | case GL_ALPHA_TEST_FUNC: |
| 1119 | #endif // defined(GL_ALPHA_TEST_FUNC) |
| 1120 | #if defined(GL_ALPHA_TEST_REF) |
| 1121 | case GL_ALPHA_TEST_REF: |
| 1122 | #endif // defined(GL_ALPHA_TEST_REF) |
| 1123 | #if defined(GL_BLEND_DST) |
| 1124 | case GL_BLEND_DST: |
| 1125 | #endif // defined(GL_BLEND_DST) |
| 1126 | #if defined(GL_BLUE_BITS) |
| 1127 | case GL_BLUE_BITS: |
| 1128 | #endif // defined(GL_BLUE_BITS) |
| 1129 | #if defined(GL_COLOR_ARRAY_BUFFER_BINDING) |
| 1130 | case GL_COLOR_ARRAY_BUFFER_BINDING: |
| 1131 | #endif // defined(GL_COLOR_ARRAY_BUFFER_BINDING) |
| 1132 | #if defined(GL_COLOR_ARRAY_SIZE) |
| 1133 | case GL_COLOR_ARRAY_SIZE: |
| 1134 | #endif // defined(GL_COLOR_ARRAY_SIZE) |
| 1135 | #if defined(GL_COLOR_ARRAY_STRIDE) |
| 1136 | case GL_COLOR_ARRAY_STRIDE: |
| 1137 | #endif // defined(GL_COLOR_ARRAY_STRIDE) |
| 1138 | #if defined(GL_COLOR_ARRAY_TYPE) |
| 1139 | case GL_COLOR_ARRAY_TYPE: |
| 1140 | #endif // defined(GL_COLOR_ARRAY_TYPE) |
| 1141 | #if defined(GL_CULL_FACE) |
| 1142 | case GL_CULL_FACE: |
| 1143 | #endif // defined(GL_CULL_FACE) |
| 1144 | #if defined(GL_DEPTH_BITS) |
| 1145 | case GL_DEPTH_BITS: |
| 1146 | #endif // defined(GL_DEPTH_BITS) |
| 1147 | #if defined(GL_DEPTH_CLEAR_VALUE) |
| 1148 | case GL_DEPTH_CLEAR_VALUE: |
| 1149 | #endif // defined(GL_DEPTH_CLEAR_VALUE) |
| 1150 | #if defined(GL_DEPTH_FUNC) |
| 1151 | case GL_DEPTH_FUNC: |
| 1152 | #endif // defined(GL_DEPTH_FUNC) |
| 1153 | #if defined(GL_DEPTH_WRITEMASK) |
| 1154 | case GL_DEPTH_WRITEMASK: |
| 1155 | #endif // defined(GL_DEPTH_WRITEMASK) |
| 1156 | #if defined(GL_FOG_DENSITY) |
| 1157 | case GL_FOG_DENSITY: |
| 1158 | #endif // defined(GL_FOG_DENSITY) |
| 1159 | #if defined(GL_FOG_END) |
| 1160 | case GL_FOG_END: |
| 1161 | #endif // defined(GL_FOG_END) |
| 1162 | #if defined(GL_FOG_MODE) |
| 1163 | case GL_FOG_MODE: |
| 1164 | #endif // defined(GL_FOG_MODE) |
| 1165 | #if defined(GL_FOG_START) |
| 1166 | case GL_FOG_START: |
| 1167 | #endif // defined(GL_FOG_START) |
| 1168 | #if defined(GL_FRONT_FACE) |
| 1169 | case GL_FRONT_FACE: |
| 1170 | #endif // defined(GL_FRONT_FACE) |
| 1171 | #if defined(GL_GREEN_BITS) |
| 1172 | case GL_GREEN_BITS: |
| 1173 | #endif // defined(GL_GREEN_BITS) |
| 1174 | #if defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES) |
| 1175 | case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES: |
| 1176 | #endif // defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES) |
| 1177 | #if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES) |
| 1178 | case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES: |
| 1179 | #endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES) |
Jack Palevich | be509c9 | 2009-05-07 09:52:14 -0700 | [diff] [blame] | 1180 | #if defined(GL_LIGHT_MODEL_COLOR_CONTROL) |
| 1181 | case GL_LIGHT_MODEL_COLOR_CONTROL: |
| 1182 | #endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL) |
| 1183 | #if defined(GL_LIGHT_MODEL_LOCAL_VIEWER) |
| 1184 | case GL_LIGHT_MODEL_LOCAL_VIEWER: |
| 1185 | #endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1186 | #if defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 1187 | case GL_LIGHT_MODEL_TWO_SIDE: |
| 1188 | #endif // defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 1189 | #if defined(GL_LINE_SMOOTH_HINT) |
| 1190 | case GL_LINE_SMOOTH_HINT: |
| 1191 | #endif // defined(GL_LINE_SMOOTH_HINT) |
| 1192 | #if defined(GL_LINE_WIDTH) |
| 1193 | case GL_LINE_WIDTH: |
| 1194 | #endif // defined(GL_LINE_WIDTH) |
| 1195 | #if defined(GL_LOGIC_OP_MODE) |
| 1196 | case GL_LOGIC_OP_MODE: |
| 1197 | #endif // defined(GL_LOGIC_OP_MODE) |
| 1198 | #if defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES) |
| 1199 | case GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES: |
| 1200 | #endif // defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES) |
| 1201 | #if defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES) |
| 1202 | case GL_MATRIX_INDEX_ARRAY_SIZE_OES: |
| 1203 | #endif // defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES) |
| 1204 | #if defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES) |
| 1205 | case GL_MATRIX_INDEX_ARRAY_STRIDE_OES: |
| 1206 | #endif // defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES) |
| 1207 | #if defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES) |
| 1208 | case GL_MATRIX_INDEX_ARRAY_TYPE_OES: |
| 1209 | #endif // defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES) |
| 1210 | #if defined(GL_MATRIX_MODE) |
| 1211 | case GL_MATRIX_MODE: |
| 1212 | #endif // defined(GL_MATRIX_MODE) |
| 1213 | #if defined(GL_MAX_CLIP_PLANES) |
| 1214 | case GL_MAX_CLIP_PLANES: |
| 1215 | #endif // defined(GL_MAX_CLIP_PLANES) |
| 1216 | #if defined(GL_MAX_ELEMENTS_INDICES) |
| 1217 | case GL_MAX_ELEMENTS_INDICES: |
| 1218 | #endif // defined(GL_MAX_ELEMENTS_INDICES) |
| 1219 | #if defined(GL_MAX_ELEMENTS_VERTICES) |
| 1220 | case GL_MAX_ELEMENTS_VERTICES: |
| 1221 | #endif // defined(GL_MAX_ELEMENTS_VERTICES) |
| 1222 | #if defined(GL_MAX_LIGHTS) |
| 1223 | case GL_MAX_LIGHTS: |
| 1224 | #endif // defined(GL_MAX_LIGHTS) |
| 1225 | #if defined(GL_MAX_MODELVIEW_STACK_DEPTH) |
| 1226 | case GL_MAX_MODELVIEW_STACK_DEPTH: |
| 1227 | #endif // defined(GL_MAX_MODELVIEW_STACK_DEPTH) |
| 1228 | #if defined(GL_MAX_PALETTE_MATRICES_OES) |
| 1229 | case GL_MAX_PALETTE_MATRICES_OES: |
| 1230 | #endif // defined(GL_MAX_PALETTE_MATRICES_OES) |
| 1231 | #if defined(GL_MAX_PROJECTION_STACK_DEPTH) |
| 1232 | case GL_MAX_PROJECTION_STACK_DEPTH: |
| 1233 | #endif // defined(GL_MAX_PROJECTION_STACK_DEPTH) |
| 1234 | #if defined(GL_MAX_TEXTURE_SIZE) |
| 1235 | case GL_MAX_TEXTURE_SIZE: |
| 1236 | #endif // defined(GL_MAX_TEXTURE_SIZE) |
| 1237 | #if defined(GL_MAX_TEXTURE_STACK_DEPTH) |
| 1238 | case GL_MAX_TEXTURE_STACK_DEPTH: |
| 1239 | #endif // defined(GL_MAX_TEXTURE_STACK_DEPTH) |
| 1240 | #if defined(GL_MAX_TEXTURE_UNITS) |
| 1241 | case GL_MAX_TEXTURE_UNITS: |
| 1242 | #endif // defined(GL_MAX_TEXTURE_UNITS) |
| 1243 | #if defined(GL_MAX_VERTEX_UNITS_OES) |
| 1244 | case GL_MAX_VERTEX_UNITS_OES: |
| 1245 | #endif // defined(GL_MAX_VERTEX_UNITS_OES) |
| 1246 | #if defined(GL_MODELVIEW_STACK_DEPTH) |
| 1247 | case GL_MODELVIEW_STACK_DEPTH: |
| 1248 | #endif // defined(GL_MODELVIEW_STACK_DEPTH) |
| 1249 | #if defined(GL_NORMAL_ARRAY_BUFFER_BINDING) |
| 1250 | case GL_NORMAL_ARRAY_BUFFER_BINDING: |
| 1251 | #endif // defined(GL_NORMAL_ARRAY_BUFFER_BINDING) |
| 1252 | #if defined(GL_NORMAL_ARRAY_STRIDE) |
| 1253 | case GL_NORMAL_ARRAY_STRIDE: |
| 1254 | #endif // defined(GL_NORMAL_ARRAY_STRIDE) |
| 1255 | #if defined(GL_NORMAL_ARRAY_TYPE) |
| 1256 | case GL_NORMAL_ARRAY_TYPE: |
| 1257 | #endif // defined(GL_NORMAL_ARRAY_TYPE) |
| 1258 | #if defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS) |
| 1259 | case GL_NUM_COMPRESSED_TEXTURE_FORMATS: |
| 1260 | #endif // defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS) |
| 1261 | #if defined(GL_PACK_ALIGNMENT) |
| 1262 | case GL_PACK_ALIGNMENT: |
| 1263 | #endif // defined(GL_PACK_ALIGNMENT) |
| 1264 | #if defined(GL_PERSPECTIVE_CORRECTION_HINT) |
| 1265 | case GL_PERSPECTIVE_CORRECTION_HINT: |
| 1266 | #endif // defined(GL_PERSPECTIVE_CORRECTION_HINT) |
| 1267 | #if defined(GL_POINT_SIZE) |
| 1268 | case GL_POINT_SIZE: |
| 1269 | #endif // defined(GL_POINT_SIZE) |
| 1270 | #if defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES) |
| 1271 | case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES: |
| 1272 | #endif // defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES) |
| 1273 | #if defined(GL_POINT_SIZE_ARRAY_STRIDE_OES) |
| 1274 | case GL_POINT_SIZE_ARRAY_STRIDE_OES: |
| 1275 | #endif // defined(GL_POINT_SIZE_ARRAY_STRIDE_OES) |
| 1276 | #if defined(GL_POINT_SIZE_ARRAY_TYPE_OES) |
| 1277 | case GL_POINT_SIZE_ARRAY_TYPE_OES: |
| 1278 | #endif // defined(GL_POINT_SIZE_ARRAY_TYPE_OES) |
| 1279 | #if defined(GL_POINT_SMOOTH_HINT) |
| 1280 | case GL_POINT_SMOOTH_HINT: |
| 1281 | #endif // defined(GL_POINT_SMOOTH_HINT) |
| 1282 | #if defined(GL_POLYGON_OFFSET_FACTOR) |
| 1283 | case GL_POLYGON_OFFSET_FACTOR: |
| 1284 | #endif // defined(GL_POLYGON_OFFSET_FACTOR) |
| 1285 | #if defined(GL_POLYGON_OFFSET_UNITS) |
| 1286 | case GL_POLYGON_OFFSET_UNITS: |
| 1287 | #endif // defined(GL_POLYGON_OFFSET_UNITS) |
| 1288 | #if defined(GL_PROJECTION_STACK_DEPTH) |
| 1289 | case GL_PROJECTION_STACK_DEPTH: |
| 1290 | #endif // defined(GL_PROJECTION_STACK_DEPTH) |
| 1291 | #if defined(GL_RED_BITS) |
| 1292 | case GL_RED_BITS: |
| 1293 | #endif // defined(GL_RED_BITS) |
| 1294 | #if defined(GL_SHADE_MODEL) |
| 1295 | case GL_SHADE_MODEL: |
| 1296 | #endif // defined(GL_SHADE_MODEL) |
| 1297 | #if defined(GL_STENCIL_BITS) |
| 1298 | case GL_STENCIL_BITS: |
| 1299 | #endif // defined(GL_STENCIL_BITS) |
| 1300 | #if defined(GL_STENCIL_CLEAR_VALUE) |
| 1301 | case GL_STENCIL_CLEAR_VALUE: |
| 1302 | #endif // defined(GL_STENCIL_CLEAR_VALUE) |
| 1303 | #if defined(GL_STENCIL_FAIL) |
| 1304 | case GL_STENCIL_FAIL: |
| 1305 | #endif // defined(GL_STENCIL_FAIL) |
| 1306 | #if defined(GL_STENCIL_FUNC) |
| 1307 | case GL_STENCIL_FUNC: |
| 1308 | #endif // defined(GL_STENCIL_FUNC) |
| 1309 | #if defined(GL_STENCIL_PASS_DEPTH_FAIL) |
| 1310 | case GL_STENCIL_PASS_DEPTH_FAIL: |
| 1311 | #endif // defined(GL_STENCIL_PASS_DEPTH_FAIL) |
| 1312 | #if defined(GL_STENCIL_PASS_DEPTH_PASS) |
| 1313 | case GL_STENCIL_PASS_DEPTH_PASS: |
| 1314 | #endif // defined(GL_STENCIL_PASS_DEPTH_PASS) |
| 1315 | #if defined(GL_STENCIL_REF) |
| 1316 | case GL_STENCIL_REF: |
| 1317 | #endif // defined(GL_STENCIL_REF) |
| 1318 | #if defined(GL_STENCIL_VALUE_MASK) |
| 1319 | case GL_STENCIL_VALUE_MASK: |
| 1320 | #endif // defined(GL_STENCIL_VALUE_MASK) |
| 1321 | #if defined(GL_STENCIL_WRITEMASK) |
| 1322 | case GL_STENCIL_WRITEMASK: |
| 1323 | #endif // defined(GL_STENCIL_WRITEMASK) |
| 1324 | #if defined(GL_SUBPIXEL_BITS) |
| 1325 | case GL_SUBPIXEL_BITS: |
| 1326 | #endif // defined(GL_SUBPIXEL_BITS) |
| 1327 | #if defined(GL_TEXTURE_BINDING_2D) |
| 1328 | case GL_TEXTURE_BINDING_2D: |
| 1329 | #endif // defined(GL_TEXTURE_BINDING_2D) |
| 1330 | #if defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING) |
| 1331 | case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING: |
| 1332 | #endif // defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING) |
| 1333 | #if defined(GL_TEXTURE_COORD_ARRAY_SIZE) |
| 1334 | case GL_TEXTURE_COORD_ARRAY_SIZE: |
| 1335 | #endif // defined(GL_TEXTURE_COORD_ARRAY_SIZE) |
| 1336 | #if defined(GL_TEXTURE_COORD_ARRAY_STRIDE) |
| 1337 | case GL_TEXTURE_COORD_ARRAY_STRIDE: |
| 1338 | #endif // defined(GL_TEXTURE_COORD_ARRAY_STRIDE) |
| 1339 | #if defined(GL_TEXTURE_COORD_ARRAY_TYPE) |
| 1340 | case GL_TEXTURE_COORD_ARRAY_TYPE: |
| 1341 | #endif // defined(GL_TEXTURE_COORD_ARRAY_TYPE) |
| 1342 | #if defined(GL_TEXTURE_STACK_DEPTH) |
| 1343 | case GL_TEXTURE_STACK_DEPTH: |
| 1344 | #endif // defined(GL_TEXTURE_STACK_DEPTH) |
| 1345 | #if defined(GL_UNPACK_ALIGNMENT) |
| 1346 | case GL_UNPACK_ALIGNMENT: |
| 1347 | #endif // defined(GL_UNPACK_ALIGNMENT) |
| 1348 | #if defined(GL_VERTEX_ARRAY_BUFFER_BINDING) |
| 1349 | case GL_VERTEX_ARRAY_BUFFER_BINDING: |
| 1350 | #endif // defined(GL_VERTEX_ARRAY_BUFFER_BINDING) |
| 1351 | #if defined(GL_VERTEX_ARRAY_SIZE) |
| 1352 | case GL_VERTEX_ARRAY_SIZE: |
| 1353 | #endif // defined(GL_VERTEX_ARRAY_SIZE) |
| 1354 | #if defined(GL_VERTEX_ARRAY_STRIDE) |
| 1355 | case GL_VERTEX_ARRAY_STRIDE: |
| 1356 | #endif // defined(GL_VERTEX_ARRAY_STRIDE) |
| 1357 | #if defined(GL_VERTEX_ARRAY_TYPE) |
| 1358 | case GL_VERTEX_ARRAY_TYPE: |
| 1359 | #endif // defined(GL_VERTEX_ARRAY_TYPE) |
| 1360 | #if defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES) |
| 1361 | case GL_WEIGHT_ARRAY_BUFFER_BINDING_OES: |
| 1362 | #endif // defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES) |
| 1363 | #if defined(GL_WEIGHT_ARRAY_SIZE_OES) |
| 1364 | case GL_WEIGHT_ARRAY_SIZE_OES: |
| 1365 | #endif // defined(GL_WEIGHT_ARRAY_SIZE_OES) |
| 1366 | #if defined(GL_WEIGHT_ARRAY_STRIDE_OES) |
| 1367 | case GL_WEIGHT_ARRAY_STRIDE_OES: |
| 1368 | #endif // defined(GL_WEIGHT_ARRAY_STRIDE_OES) |
| 1369 | #if defined(GL_WEIGHT_ARRAY_TYPE_OES) |
| 1370 | case GL_WEIGHT_ARRAY_TYPE_OES: |
| 1371 | #endif // defined(GL_WEIGHT_ARRAY_TYPE_OES) |
| 1372 | _needed = 1; |
| 1373 | break; |
| 1374 | #if defined(GL_ALIASED_POINT_SIZE_RANGE) |
| 1375 | case GL_ALIASED_POINT_SIZE_RANGE: |
| 1376 | #endif // defined(GL_ALIASED_POINT_SIZE_RANGE) |
| 1377 | #if defined(GL_ALIASED_LINE_WIDTH_RANGE) |
| 1378 | case GL_ALIASED_LINE_WIDTH_RANGE: |
| 1379 | #endif // defined(GL_ALIASED_LINE_WIDTH_RANGE) |
| 1380 | #if defined(GL_DEPTH_RANGE) |
| 1381 | case GL_DEPTH_RANGE: |
| 1382 | #endif // defined(GL_DEPTH_RANGE) |
| 1383 | #if defined(GL_MAX_VIEWPORT_DIMS) |
| 1384 | case GL_MAX_VIEWPORT_DIMS: |
| 1385 | #endif // defined(GL_MAX_VIEWPORT_DIMS) |
| 1386 | #if defined(GL_SMOOTH_LINE_WIDTH_RANGE) |
| 1387 | case GL_SMOOTH_LINE_WIDTH_RANGE: |
| 1388 | #endif // defined(GL_SMOOTH_LINE_WIDTH_RANGE) |
| 1389 | #if defined(GL_SMOOTH_POINT_SIZE_RANGE) |
| 1390 | case GL_SMOOTH_POINT_SIZE_RANGE: |
| 1391 | #endif // defined(GL_SMOOTH_POINT_SIZE_RANGE) |
| 1392 | _needed = 2; |
| 1393 | break; |
| 1394 | #if defined(GL_COLOR_CLEAR_VALUE) |
| 1395 | case GL_COLOR_CLEAR_VALUE: |
| 1396 | #endif // defined(GL_COLOR_CLEAR_VALUE) |
| 1397 | #if defined(GL_COLOR_WRITEMASK) |
| 1398 | case GL_COLOR_WRITEMASK: |
| 1399 | #endif // defined(GL_COLOR_WRITEMASK) |
Jack Palevich | be509c9 | 2009-05-07 09:52:14 -0700 | [diff] [blame] | 1400 | #if defined(GL_FOG_COLOR) |
| 1401 | case GL_FOG_COLOR: |
| 1402 | #endif // defined(GL_FOG_COLOR) |
| 1403 | #if defined(GL_LIGHT_MODEL_AMBIENT) |
| 1404 | case GL_LIGHT_MODEL_AMBIENT: |
| 1405 | #endif // defined(GL_LIGHT_MODEL_AMBIENT) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1406 | #if defined(GL_SCISSOR_BOX) |
| 1407 | case GL_SCISSOR_BOX: |
| 1408 | #endif // defined(GL_SCISSOR_BOX) |
| 1409 | #if defined(GL_VIEWPORT) |
| 1410 | case GL_VIEWPORT: |
| 1411 | #endif // defined(GL_VIEWPORT) |
| 1412 | _needed = 4; |
| 1413 | break; |
| 1414 | #if defined(GL_MODELVIEW_MATRIX) |
| 1415 | case GL_MODELVIEW_MATRIX: |
| 1416 | #endif // defined(GL_MODELVIEW_MATRIX) |
| 1417 | #if defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1418 | case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES: |
| 1419 | #endif // defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1420 | #if defined(GL_PROJECTION_MATRIX) |
| 1421 | case GL_PROJECTION_MATRIX: |
| 1422 | #endif // defined(GL_PROJECTION_MATRIX) |
| 1423 | #if defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1424 | case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES: |
| 1425 | #endif // defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1426 | #if defined(GL_TEXTURE_MATRIX) |
| 1427 | case GL_TEXTURE_MATRIX: |
| 1428 | #endif // defined(GL_TEXTURE_MATRIX) |
| 1429 | #if defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1430 | case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES: |
| 1431 | #endif // defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1432 | _needed = 16; |
| 1433 | break; |
| 1434 | #if defined(GL_COMPRESSED_TEXTURE_FORMATS) |
| 1435 | case GL_COMPRESSED_TEXTURE_FORMATS: |
| 1436 | #endif // defined(GL_COMPRESSED_TEXTURE_FORMATS) |
Jack Palevich | be509c9 | 2009-05-07 09:52:14 -0700 | [diff] [blame] | 1437 | _needed = getNumCompressedTextureFormats(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1438 | break; |
| 1439 | default: |
| 1440 | _needed = 0; |
| 1441 | break; |
| 1442 | } |
| 1443 | if (_remaining < _needed) { |
| 1444 | _exception = 1; |
| 1445 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 1446 | goto exit; |
| 1447 | } |
| 1448 | params_base = (GLint *) |
| 1449 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1450 | params = params_base + offset; |
| 1451 | |
| 1452 | glGetIntegerv( |
| 1453 | (GLenum)pname, |
| 1454 | (GLint *)params |
| 1455 | ); |
| 1456 | |
| 1457 | exit: |
| 1458 | if (params_base) { |
| 1459 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1460 | _exception ? JNI_ABORT: 0); |
| 1461 | } |
| 1462 | } |
| 1463 | |
| 1464 | /* void glGetIntegerv ( GLenum pname, GLint *params ) */ |
| 1465 | static void |
| 1466 | android_glGetIntegerv__ILjava_nio_IntBuffer_2 |
| 1467 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 1468 | jint _exception = 0; |
| 1469 | jarray _array = (jarray) 0; |
| 1470 | jint _remaining; |
| 1471 | GLint *params = (GLint *) 0; |
| 1472 | |
| 1473 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1474 | int _needed; |
| 1475 | switch (pname) { |
| 1476 | #if defined(GL_ALPHA_BITS) |
| 1477 | case GL_ALPHA_BITS: |
| 1478 | #endif // defined(GL_ALPHA_BITS) |
| 1479 | #if defined(GL_ALPHA_TEST_FUNC) |
| 1480 | case GL_ALPHA_TEST_FUNC: |
| 1481 | #endif // defined(GL_ALPHA_TEST_FUNC) |
| 1482 | #if defined(GL_ALPHA_TEST_REF) |
| 1483 | case GL_ALPHA_TEST_REF: |
| 1484 | #endif // defined(GL_ALPHA_TEST_REF) |
| 1485 | #if defined(GL_BLEND_DST) |
| 1486 | case GL_BLEND_DST: |
| 1487 | #endif // defined(GL_BLEND_DST) |
| 1488 | #if defined(GL_BLUE_BITS) |
| 1489 | case GL_BLUE_BITS: |
| 1490 | #endif // defined(GL_BLUE_BITS) |
| 1491 | #if defined(GL_COLOR_ARRAY_BUFFER_BINDING) |
| 1492 | case GL_COLOR_ARRAY_BUFFER_BINDING: |
| 1493 | #endif // defined(GL_COLOR_ARRAY_BUFFER_BINDING) |
| 1494 | #if defined(GL_COLOR_ARRAY_SIZE) |
| 1495 | case GL_COLOR_ARRAY_SIZE: |
| 1496 | #endif // defined(GL_COLOR_ARRAY_SIZE) |
| 1497 | #if defined(GL_COLOR_ARRAY_STRIDE) |
| 1498 | case GL_COLOR_ARRAY_STRIDE: |
| 1499 | #endif // defined(GL_COLOR_ARRAY_STRIDE) |
| 1500 | #if defined(GL_COLOR_ARRAY_TYPE) |
| 1501 | case GL_COLOR_ARRAY_TYPE: |
| 1502 | #endif // defined(GL_COLOR_ARRAY_TYPE) |
| 1503 | #if defined(GL_CULL_FACE) |
| 1504 | case GL_CULL_FACE: |
| 1505 | #endif // defined(GL_CULL_FACE) |
| 1506 | #if defined(GL_DEPTH_BITS) |
| 1507 | case GL_DEPTH_BITS: |
| 1508 | #endif // defined(GL_DEPTH_BITS) |
| 1509 | #if defined(GL_DEPTH_CLEAR_VALUE) |
| 1510 | case GL_DEPTH_CLEAR_VALUE: |
| 1511 | #endif // defined(GL_DEPTH_CLEAR_VALUE) |
| 1512 | #if defined(GL_DEPTH_FUNC) |
| 1513 | case GL_DEPTH_FUNC: |
| 1514 | #endif // defined(GL_DEPTH_FUNC) |
| 1515 | #if defined(GL_DEPTH_WRITEMASK) |
| 1516 | case GL_DEPTH_WRITEMASK: |
| 1517 | #endif // defined(GL_DEPTH_WRITEMASK) |
| 1518 | #if defined(GL_FOG_DENSITY) |
| 1519 | case GL_FOG_DENSITY: |
| 1520 | #endif // defined(GL_FOG_DENSITY) |
| 1521 | #if defined(GL_FOG_END) |
| 1522 | case GL_FOG_END: |
| 1523 | #endif // defined(GL_FOG_END) |
| 1524 | #if defined(GL_FOG_MODE) |
| 1525 | case GL_FOG_MODE: |
| 1526 | #endif // defined(GL_FOG_MODE) |
| 1527 | #if defined(GL_FOG_START) |
| 1528 | case GL_FOG_START: |
| 1529 | #endif // defined(GL_FOG_START) |
| 1530 | #if defined(GL_FRONT_FACE) |
| 1531 | case GL_FRONT_FACE: |
| 1532 | #endif // defined(GL_FRONT_FACE) |
| 1533 | #if defined(GL_GREEN_BITS) |
| 1534 | case GL_GREEN_BITS: |
| 1535 | #endif // defined(GL_GREEN_BITS) |
| 1536 | #if defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES) |
| 1537 | case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES: |
| 1538 | #endif // defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES) |
| 1539 | #if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES) |
| 1540 | case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES: |
| 1541 | #endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES) |
Jack Palevich | be509c9 | 2009-05-07 09:52:14 -0700 | [diff] [blame] | 1542 | #if defined(GL_LIGHT_MODEL_COLOR_CONTROL) |
| 1543 | case GL_LIGHT_MODEL_COLOR_CONTROL: |
| 1544 | #endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL) |
| 1545 | #if defined(GL_LIGHT_MODEL_LOCAL_VIEWER) |
| 1546 | case GL_LIGHT_MODEL_LOCAL_VIEWER: |
| 1547 | #endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1548 | #if defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 1549 | case GL_LIGHT_MODEL_TWO_SIDE: |
| 1550 | #endif // defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 1551 | #if defined(GL_LINE_SMOOTH_HINT) |
| 1552 | case GL_LINE_SMOOTH_HINT: |
| 1553 | #endif // defined(GL_LINE_SMOOTH_HINT) |
| 1554 | #if defined(GL_LINE_WIDTH) |
| 1555 | case GL_LINE_WIDTH: |
| 1556 | #endif // defined(GL_LINE_WIDTH) |
| 1557 | #if defined(GL_LOGIC_OP_MODE) |
| 1558 | case GL_LOGIC_OP_MODE: |
| 1559 | #endif // defined(GL_LOGIC_OP_MODE) |
| 1560 | #if defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES) |
| 1561 | case GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES: |
| 1562 | #endif // defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES) |
| 1563 | #if defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES) |
| 1564 | case GL_MATRIX_INDEX_ARRAY_SIZE_OES: |
| 1565 | #endif // defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES) |
| 1566 | #if defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES) |
| 1567 | case GL_MATRIX_INDEX_ARRAY_STRIDE_OES: |
| 1568 | #endif // defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES) |
| 1569 | #if defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES) |
| 1570 | case GL_MATRIX_INDEX_ARRAY_TYPE_OES: |
| 1571 | #endif // defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES) |
| 1572 | #if defined(GL_MATRIX_MODE) |
| 1573 | case GL_MATRIX_MODE: |
| 1574 | #endif // defined(GL_MATRIX_MODE) |
| 1575 | #if defined(GL_MAX_CLIP_PLANES) |
| 1576 | case GL_MAX_CLIP_PLANES: |
| 1577 | #endif // defined(GL_MAX_CLIP_PLANES) |
| 1578 | #if defined(GL_MAX_ELEMENTS_INDICES) |
| 1579 | case GL_MAX_ELEMENTS_INDICES: |
| 1580 | #endif // defined(GL_MAX_ELEMENTS_INDICES) |
| 1581 | #if defined(GL_MAX_ELEMENTS_VERTICES) |
| 1582 | case GL_MAX_ELEMENTS_VERTICES: |
| 1583 | #endif // defined(GL_MAX_ELEMENTS_VERTICES) |
| 1584 | #if defined(GL_MAX_LIGHTS) |
| 1585 | case GL_MAX_LIGHTS: |
| 1586 | #endif // defined(GL_MAX_LIGHTS) |
| 1587 | #if defined(GL_MAX_MODELVIEW_STACK_DEPTH) |
| 1588 | case GL_MAX_MODELVIEW_STACK_DEPTH: |
| 1589 | #endif // defined(GL_MAX_MODELVIEW_STACK_DEPTH) |
| 1590 | #if defined(GL_MAX_PALETTE_MATRICES_OES) |
| 1591 | case GL_MAX_PALETTE_MATRICES_OES: |
| 1592 | #endif // defined(GL_MAX_PALETTE_MATRICES_OES) |
| 1593 | #if defined(GL_MAX_PROJECTION_STACK_DEPTH) |
| 1594 | case GL_MAX_PROJECTION_STACK_DEPTH: |
| 1595 | #endif // defined(GL_MAX_PROJECTION_STACK_DEPTH) |
| 1596 | #if defined(GL_MAX_TEXTURE_SIZE) |
| 1597 | case GL_MAX_TEXTURE_SIZE: |
| 1598 | #endif // defined(GL_MAX_TEXTURE_SIZE) |
| 1599 | #if defined(GL_MAX_TEXTURE_STACK_DEPTH) |
| 1600 | case GL_MAX_TEXTURE_STACK_DEPTH: |
| 1601 | #endif // defined(GL_MAX_TEXTURE_STACK_DEPTH) |
| 1602 | #if defined(GL_MAX_TEXTURE_UNITS) |
| 1603 | case GL_MAX_TEXTURE_UNITS: |
| 1604 | #endif // defined(GL_MAX_TEXTURE_UNITS) |
| 1605 | #if defined(GL_MAX_VERTEX_UNITS_OES) |
| 1606 | case GL_MAX_VERTEX_UNITS_OES: |
| 1607 | #endif // defined(GL_MAX_VERTEX_UNITS_OES) |
| 1608 | #if defined(GL_MODELVIEW_STACK_DEPTH) |
| 1609 | case GL_MODELVIEW_STACK_DEPTH: |
| 1610 | #endif // defined(GL_MODELVIEW_STACK_DEPTH) |
| 1611 | #if defined(GL_NORMAL_ARRAY_BUFFER_BINDING) |
| 1612 | case GL_NORMAL_ARRAY_BUFFER_BINDING: |
| 1613 | #endif // defined(GL_NORMAL_ARRAY_BUFFER_BINDING) |
| 1614 | #if defined(GL_NORMAL_ARRAY_STRIDE) |
| 1615 | case GL_NORMAL_ARRAY_STRIDE: |
| 1616 | #endif // defined(GL_NORMAL_ARRAY_STRIDE) |
| 1617 | #if defined(GL_NORMAL_ARRAY_TYPE) |
| 1618 | case GL_NORMAL_ARRAY_TYPE: |
| 1619 | #endif // defined(GL_NORMAL_ARRAY_TYPE) |
| 1620 | #if defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS) |
| 1621 | case GL_NUM_COMPRESSED_TEXTURE_FORMATS: |
| 1622 | #endif // defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS) |
| 1623 | #if defined(GL_PACK_ALIGNMENT) |
| 1624 | case GL_PACK_ALIGNMENT: |
| 1625 | #endif // defined(GL_PACK_ALIGNMENT) |
| 1626 | #if defined(GL_PERSPECTIVE_CORRECTION_HINT) |
| 1627 | case GL_PERSPECTIVE_CORRECTION_HINT: |
| 1628 | #endif // defined(GL_PERSPECTIVE_CORRECTION_HINT) |
| 1629 | #if defined(GL_POINT_SIZE) |
| 1630 | case GL_POINT_SIZE: |
| 1631 | #endif // defined(GL_POINT_SIZE) |
| 1632 | #if defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES) |
| 1633 | case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES: |
| 1634 | #endif // defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES) |
| 1635 | #if defined(GL_POINT_SIZE_ARRAY_STRIDE_OES) |
| 1636 | case GL_POINT_SIZE_ARRAY_STRIDE_OES: |
| 1637 | #endif // defined(GL_POINT_SIZE_ARRAY_STRIDE_OES) |
| 1638 | #if defined(GL_POINT_SIZE_ARRAY_TYPE_OES) |
| 1639 | case GL_POINT_SIZE_ARRAY_TYPE_OES: |
| 1640 | #endif // defined(GL_POINT_SIZE_ARRAY_TYPE_OES) |
| 1641 | #if defined(GL_POINT_SMOOTH_HINT) |
| 1642 | case GL_POINT_SMOOTH_HINT: |
| 1643 | #endif // defined(GL_POINT_SMOOTH_HINT) |
| 1644 | #if defined(GL_POLYGON_OFFSET_FACTOR) |
| 1645 | case GL_POLYGON_OFFSET_FACTOR: |
| 1646 | #endif // defined(GL_POLYGON_OFFSET_FACTOR) |
| 1647 | #if defined(GL_POLYGON_OFFSET_UNITS) |
| 1648 | case GL_POLYGON_OFFSET_UNITS: |
| 1649 | #endif // defined(GL_POLYGON_OFFSET_UNITS) |
| 1650 | #if defined(GL_PROJECTION_STACK_DEPTH) |
| 1651 | case GL_PROJECTION_STACK_DEPTH: |
| 1652 | #endif // defined(GL_PROJECTION_STACK_DEPTH) |
| 1653 | #if defined(GL_RED_BITS) |
| 1654 | case GL_RED_BITS: |
| 1655 | #endif // defined(GL_RED_BITS) |
| 1656 | #if defined(GL_SHADE_MODEL) |
| 1657 | case GL_SHADE_MODEL: |
| 1658 | #endif // defined(GL_SHADE_MODEL) |
| 1659 | #if defined(GL_STENCIL_BITS) |
| 1660 | case GL_STENCIL_BITS: |
| 1661 | #endif // defined(GL_STENCIL_BITS) |
| 1662 | #if defined(GL_STENCIL_CLEAR_VALUE) |
| 1663 | case GL_STENCIL_CLEAR_VALUE: |
| 1664 | #endif // defined(GL_STENCIL_CLEAR_VALUE) |
| 1665 | #if defined(GL_STENCIL_FAIL) |
| 1666 | case GL_STENCIL_FAIL: |
| 1667 | #endif // defined(GL_STENCIL_FAIL) |
| 1668 | #if defined(GL_STENCIL_FUNC) |
| 1669 | case GL_STENCIL_FUNC: |
| 1670 | #endif // defined(GL_STENCIL_FUNC) |
| 1671 | #if defined(GL_STENCIL_PASS_DEPTH_FAIL) |
| 1672 | case GL_STENCIL_PASS_DEPTH_FAIL: |
| 1673 | #endif // defined(GL_STENCIL_PASS_DEPTH_FAIL) |
| 1674 | #if defined(GL_STENCIL_PASS_DEPTH_PASS) |
| 1675 | case GL_STENCIL_PASS_DEPTH_PASS: |
| 1676 | #endif // defined(GL_STENCIL_PASS_DEPTH_PASS) |
| 1677 | #if defined(GL_STENCIL_REF) |
| 1678 | case GL_STENCIL_REF: |
| 1679 | #endif // defined(GL_STENCIL_REF) |
| 1680 | #if defined(GL_STENCIL_VALUE_MASK) |
| 1681 | case GL_STENCIL_VALUE_MASK: |
| 1682 | #endif // defined(GL_STENCIL_VALUE_MASK) |
| 1683 | #if defined(GL_STENCIL_WRITEMASK) |
| 1684 | case GL_STENCIL_WRITEMASK: |
| 1685 | #endif // defined(GL_STENCIL_WRITEMASK) |
| 1686 | #if defined(GL_SUBPIXEL_BITS) |
| 1687 | case GL_SUBPIXEL_BITS: |
| 1688 | #endif // defined(GL_SUBPIXEL_BITS) |
| 1689 | #if defined(GL_TEXTURE_BINDING_2D) |
| 1690 | case GL_TEXTURE_BINDING_2D: |
| 1691 | #endif // defined(GL_TEXTURE_BINDING_2D) |
| 1692 | #if defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING) |
| 1693 | case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING: |
| 1694 | #endif // defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING) |
| 1695 | #if defined(GL_TEXTURE_COORD_ARRAY_SIZE) |
| 1696 | case GL_TEXTURE_COORD_ARRAY_SIZE: |
| 1697 | #endif // defined(GL_TEXTURE_COORD_ARRAY_SIZE) |
| 1698 | #if defined(GL_TEXTURE_COORD_ARRAY_STRIDE) |
| 1699 | case GL_TEXTURE_COORD_ARRAY_STRIDE: |
| 1700 | #endif // defined(GL_TEXTURE_COORD_ARRAY_STRIDE) |
| 1701 | #if defined(GL_TEXTURE_COORD_ARRAY_TYPE) |
| 1702 | case GL_TEXTURE_COORD_ARRAY_TYPE: |
| 1703 | #endif // defined(GL_TEXTURE_COORD_ARRAY_TYPE) |
| 1704 | #if defined(GL_TEXTURE_STACK_DEPTH) |
| 1705 | case GL_TEXTURE_STACK_DEPTH: |
| 1706 | #endif // defined(GL_TEXTURE_STACK_DEPTH) |
| 1707 | #if defined(GL_UNPACK_ALIGNMENT) |
| 1708 | case GL_UNPACK_ALIGNMENT: |
| 1709 | #endif // defined(GL_UNPACK_ALIGNMENT) |
| 1710 | #if defined(GL_VERTEX_ARRAY_BUFFER_BINDING) |
| 1711 | case GL_VERTEX_ARRAY_BUFFER_BINDING: |
| 1712 | #endif // defined(GL_VERTEX_ARRAY_BUFFER_BINDING) |
| 1713 | #if defined(GL_VERTEX_ARRAY_SIZE) |
| 1714 | case GL_VERTEX_ARRAY_SIZE: |
| 1715 | #endif // defined(GL_VERTEX_ARRAY_SIZE) |
| 1716 | #if defined(GL_VERTEX_ARRAY_STRIDE) |
| 1717 | case GL_VERTEX_ARRAY_STRIDE: |
| 1718 | #endif // defined(GL_VERTEX_ARRAY_STRIDE) |
| 1719 | #if defined(GL_VERTEX_ARRAY_TYPE) |
| 1720 | case GL_VERTEX_ARRAY_TYPE: |
| 1721 | #endif // defined(GL_VERTEX_ARRAY_TYPE) |
| 1722 | #if defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES) |
| 1723 | case GL_WEIGHT_ARRAY_BUFFER_BINDING_OES: |
| 1724 | #endif // defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES) |
| 1725 | #if defined(GL_WEIGHT_ARRAY_SIZE_OES) |
| 1726 | case GL_WEIGHT_ARRAY_SIZE_OES: |
| 1727 | #endif // defined(GL_WEIGHT_ARRAY_SIZE_OES) |
| 1728 | #if defined(GL_WEIGHT_ARRAY_STRIDE_OES) |
| 1729 | case GL_WEIGHT_ARRAY_STRIDE_OES: |
| 1730 | #endif // defined(GL_WEIGHT_ARRAY_STRIDE_OES) |
| 1731 | #if defined(GL_WEIGHT_ARRAY_TYPE_OES) |
| 1732 | case GL_WEIGHT_ARRAY_TYPE_OES: |
| 1733 | #endif // defined(GL_WEIGHT_ARRAY_TYPE_OES) |
| 1734 | _needed = 1; |
| 1735 | break; |
| 1736 | #if defined(GL_ALIASED_POINT_SIZE_RANGE) |
| 1737 | case GL_ALIASED_POINT_SIZE_RANGE: |
| 1738 | #endif // defined(GL_ALIASED_POINT_SIZE_RANGE) |
| 1739 | #if defined(GL_ALIASED_LINE_WIDTH_RANGE) |
| 1740 | case GL_ALIASED_LINE_WIDTH_RANGE: |
| 1741 | #endif // defined(GL_ALIASED_LINE_WIDTH_RANGE) |
| 1742 | #if defined(GL_DEPTH_RANGE) |
| 1743 | case GL_DEPTH_RANGE: |
| 1744 | #endif // defined(GL_DEPTH_RANGE) |
| 1745 | #if defined(GL_MAX_VIEWPORT_DIMS) |
| 1746 | case GL_MAX_VIEWPORT_DIMS: |
| 1747 | #endif // defined(GL_MAX_VIEWPORT_DIMS) |
| 1748 | #if defined(GL_SMOOTH_LINE_WIDTH_RANGE) |
| 1749 | case GL_SMOOTH_LINE_WIDTH_RANGE: |
| 1750 | #endif // defined(GL_SMOOTH_LINE_WIDTH_RANGE) |
| 1751 | #if defined(GL_SMOOTH_POINT_SIZE_RANGE) |
| 1752 | case GL_SMOOTH_POINT_SIZE_RANGE: |
| 1753 | #endif // defined(GL_SMOOTH_POINT_SIZE_RANGE) |
| 1754 | _needed = 2; |
| 1755 | break; |
| 1756 | #if defined(GL_COLOR_CLEAR_VALUE) |
| 1757 | case GL_COLOR_CLEAR_VALUE: |
| 1758 | #endif // defined(GL_COLOR_CLEAR_VALUE) |
| 1759 | #if defined(GL_COLOR_WRITEMASK) |
| 1760 | case GL_COLOR_WRITEMASK: |
| 1761 | #endif // defined(GL_COLOR_WRITEMASK) |
Jack Palevich | be509c9 | 2009-05-07 09:52:14 -0700 | [diff] [blame] | 1762 | #if defined(GL_FOG_COLOR) |
| 1763 | case GL_FOG_COLOR: |
| 1764 | #endif // defined(GL_FOG_COLOR) |
| 1765 | #if defined(GL_LIGHT_MODEL_AMBIENT) |
| 1766 | case GL_LIGHT_MODEL_AMBIENT: |
| 1767 | #endif // defined(GL_LIGHT_MODEL_AMBIENT) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1768 | #if defined(GL_SCISSOR_BOX) |
| 1769 | case GL_SCISSOR_BOX: |
| 1770 | #endif // defined(GL_SCISSOR_BOX) |
| 1771 | #if defined(GL_VIEWPORT) |
| 1772 | case GL_VIEWPORT: |
| 1773 | #endif // defined(GL_VIEWPORT) |
| 1774 | _needed = 4; |
| 1775 | break; |
| 1776 | #if defined(GL_MODELVIEW_MATRIX) |
| 1777 | case GL_MODELVIEW_MATRIX: |
| 1778 | #endif // defined(GL_MODELVIEW_MATRIX) |
| 1779 | #if defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1780 | case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES: |
| 1781 | #endif // defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1782 | #if defined(GL_PROJECTION_MATRIX) |
| 1783 | case GL_PROJECTION_MATRIX: |
| 1784 | #endif // defined(GL_PROJECTION_MATRIX) |
| 1785 | #if defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1786 | case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES: |
| 1787 | #endif // defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1788 | #if defined(GL_TEXTURE_MATRIX) |
| 1789 | case GL_TEXTURE_MATRIX: |
| 1790 | #endif // defined(GL_TEXTURE_MATRIX) |
| 1791 | #if defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1792 | case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES: |
| 1793 | #endif // defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES) |
| 1794 | _needed = 16; |
| 1795 | break; |
| 1796 | #if defined(GL_COMPRESSED_TEXTURE_FORMATS) |
| 1797 | case GL_COMPRESSED_TEXTURE_FORMATS: |
| 1798 | #endif // defined(GL_COMPRESSED_TEXTURE_FORMATS) |
Jack Palevich | be509c9 | 2009-05-07 09:52:14 -0700 | [diff] [blame] | 1799 | _needed = getNumCompressedTextureFormats(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1800 | break; |
| 1801 | default: |
| 1802 | _needed = 0; |
| 1803 | break; |
| 1804 | } |
| 1805 | if (_remaining < _needed) { |
| 1806 | _exception = 1; |
| 1807 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 1808 | goto exit; |
| 1809 | } |
| 1810 | glGetIntegerv( |
| 1811 | (GLenum)pname, |
| 1812 | (GLint *)params |
| 1813 | ); |
| 1814 | |
| 1815 | exit: |
| 1816 | if (_array) { |
| 1817 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 1818 | } |
| 1819 | } |
| 1820 | |
| 1821 | #include <string.h> |
| 1822 | |
| 1823 | /* const GLubyte * glGetString ( GLenum name ) */ |
Jack Palevich | 27f8002 | 2009-04-15 19:13:17 -0700 | [diff] [blame] | 1824 | static |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1825 | jstring |
| 1826 | android_glGetString |
| 1827 | (JNIEnv *_env, jobject _this, jint name) { |
| 1828 | const char * chars = (const char *)glGetString((GLenum)name); |
| 1829 | jstring output = _env->NewStringUTF(chars); |
| 1830 | return output; |
| 1831 | } |
| 1832 | /* void glHint ( GLenum target, GLenum mode ) */ |
| 1833 | static void |
| 1834 | android_glHint__II |
| 1835 | (JNIEnv *_env, jobject _this, jint target, jint mode) { |
| 1836 | glHint( |
| 1837 | (GLenum)target, |
| 1838 | (GLenum)mode |
| 1839 | ); |
| 1840 | } |
| 1841 | |
| 1842 | /* void glLightModelf ( GLenum pname, GLfloat param ) */ |
| 1843 | static void |
| 1844 | android_glLightModelf__IF |
| 1845 | (JNIEnv *_env, jobject _this, jint pname, jfloat param) { |
| 1846 | glLightModelf( |
| 1847 | (GLenum)pname, |
| 1848 | (GLfloat)param |
| 1849 | ); |
| 1850 | } |
| 1851 | |
| 1852 | /* void glLightModelfv ( GLenum pname, const GLfloat *params ) */ |
| 1853 | static void |
| 1854 | android_glLightModelfv__I_3FI |
| 1855 | (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { |
| 1856 | GLfloat *params_base = (GLfloat *) 0; |
| 1857 | jint _remaining; |
| 1858 | GLfloat *params = (GLfloat *) 0; |
| 1859 | |
| 1860 | if (!params_ref) { |
| 1861 | _env->ThrowNew(IAEClass, "params == null"); |
| 1862 | goto exit; |
| 1863 | } |
| 1864 | if (offset < 0) { |
| 1865 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 1866 | goto exit; |
| 1867 | } |
| 1868 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1869 | int _needed; |
| 1870 | switch (pname) { |
| 1871 | #if defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 1872 | case GL_LIGHT_MODEL_TWO_SIDE: |
| 1873 | #endif // defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 1874 | _needed = 1; |
| 1875 | break; |
| 1876 | #if defined(GL_LIGHT_MODEL_AMBIENT) |
| 1877 | case GL_LIGHT_MODEL_AMBIENT: |
| 1878 | #endif // defined(GL_LIGHT_MODEL_AMBIENT) |
| 1879 | _needed = 4; |
| 1880 | break; |
| 1881 | default: |
| 1882 | _needed = 0; |
| 1883 | break; |
| 1884 | } |
| 1885 | if (_remaining < _needed) { |
| 1886 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 1887 | goto exit; |
| 1888 | } |
| 1889 | params_base = (GLfloat *) |
| 1890 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1891 | params = params_base + offset; |
| 1892 | |
| 1893 | glLightModelfv( |
| 1894 | (GLenum)pname, |
| 1895 | (GLfloat *)params |
| 1896 | ); |
| 1897 | |
| 1898 | exit: |
| 1899 | if (params_base) { |
| 1900 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 1901 | JNI_ABORT); |
| 1902 | } |
| 1903 | } |
| 1904 | |
| 1905 | /* void glLightModelfv ( GLenum pname, const GLfloat *params ) */ |
| 1906 | static void |
| 1907 | android_glLightModelfv__ILjava_nio_FloatBuffer_2 |
| 1908 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 1909 | jarray _array = (jarray) 0; |
| 1910 | jint _remaining; |
| 1911 | GLfloat *params = (GLfloat *) 0; |
| 1912 | |
| 1913 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 1914 | int _needed; |
| 1915 | switch (pname) { |
| 1916 | #if defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 1917 | case GL_LIGHT_MODEL_TWO_SIDE: |
| 1918 | #endif // defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 1919 | _needed = 1; |
| 1920 | break; |
| 1921 | #if defined(GL_LIGHT_MODEL_AMBIENT) |
| 1922 | case GL_LIGHT_MODEL_AMBIENT: |
| 1923 | #endif // defined(GL_LIGHT_MODEL_AMBIENT) |
| 1924 | _needed = 4; |
| 1925 | break; |
| 1926 | default: |
| 1927 | _needed = 0; |
| 1928 | break; |
| 1929 | } |
| 1930 | if (_remaining < _needed) { |
| 1931 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 1932 | goto exit; |
| 1933 | } |
| 1934 | glLightModelfv( |
| 1935 | (GLenum)pname, |
| 1936 | (GLfloat *)params |
| 1937 | ); |
| 1938 | |
| 1939 | exit: |
| 1940 | if (_array) { |
| 1941 | releasePointer(_env, _array, params, JNI_FALSE); |
| 1942 | } |
| 1943 | } |
| 1944 | |
| 1945 | /* void glLightModelx ( GLenum pname, GLfixed param ) */ |
| 1946 | static void |
| 1947 | android_glLightModelx__II |
| 1948 | (JNIEnv *_env, jobject _this, jint pname, jint param) { |
| 1949 | glLightModelx( |
| 1950 | (GLenum)pname, |
| 1951 | (GLfixed)param |
| 1952 | ); |
| 1953 | } |
| 1954 | |
| 1955 | /* void glLightModelxv ( GLenum pname, const GLfixed *params ) */ |
| 1956 | static void |
| 1957 | android_glLightModelxv__I_3II |
| 1958 | (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { |
| 1959 | GLfixed *params_base = (GLfixed *) 0; |
| 1960 | jint _remaining; |
| 1961 | GLfixed *params = (GLfixed *) 0; |
| 1962 | |
| 1963 | if (!params_ref) { |
| 1964 | _env->ThrowNew(IAEClass, "params == null"); |
| 1965 | goto exit; |
| 1966 | } |
| 1967 | if (offset < 0) { |
| 1968 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 1969 | goto exit; |
| 1970 | } |
| 1971 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1972 | int _needed; |
| 1973 | switch (pname) { |
| 1974 | #if defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 1975 | case GL_LIGHT_MODEL_TWO_SIDE: |
| 1976 | #endif // defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 1977 | _needed = 1; |
| 1978 | break; |
| 1979 | #if defined(GL_LIGHT_MODEL_AMBIENT) |
| 1980 | case GL_LIGHT_MODEL_AMBIENT: |
| 1981 | #endif // defined(GL_LIGHT_MODEL_AMBIENT) |
| 1982 | _needed = 4; |
| 1983 | break; |
| 1984 | default: |
| 1985 | _needed = 0; |
| 1986 | break; |
| 1987 | } |
| 1988 | if (_remaining < _needed) { |
| 1989 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 1990 | goto exit; |
| 1991 | } |
| 1992 | params_base = (GLfixed *) |
| 1993 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 1994 | params = params_base + offset; |
| 1995 | |
| 1996 | glLightModelxv( |
| 1997 | (GLenum)pname, |
| 1998 | (GLfixed *)params |
| 1999 | ); |
| 2000 | |
| 2001 | exit: |
| 2002 | if (params_base) { |
| 2003 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2004 | JNI_ABORT); |
| 2005 | } |
| 2006 | } |
| 2007 | |
| 2008 | /* void glLightModelxv ( GLenum pname, const GLfixed *params ) */ |
| 2009 | static void |
| 2010 | android_glLightModelxv__ILjava_nio_IntBuffer_2 |
| 2011 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 2012 | jarray _array = (jarray) 0; |
| 2013 | jint _remaining; |
| 2014 | GLfixed *params = (GLfixed *) 0; |
| 2015 | |
| 2016 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2017 | int _needed; |
| 2018 | switch (pname) { |
| 2019 | #if defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 2020 | case GL_LIGHT_MODEL_TWO_SIDE: |
| 2021 | #endif // defined(GL_LIGHT_MODEL_TWO_SIDE) |
| 2022 | _needed = 1; |
| 2023 | break; |
| 2024 | #if defined(GL_LIGHT_MODEL_AMBIENT) |
| 2025 | case GL_LIGHT_MODEL_AMBIENT: |
| 2026 | #endif // defined(GL_LIGHT_MODEL_AMBIENT) |
| 2027 | _needed = 4; |
| 2028 | break; |
| 2029 | default: |
| 2030 | _needed = 0; |
| 2031 | break; |
| 2032 | } |
| 2033 | if (_remaining < _needed) { |
| 2034 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 2035 | goto exit; |
| 2036 | } |
| 2037 | glLightModelxv( |
| 2038 | (GLenum)pname, |
| 2039 | (GLfixed *)params |
| 2040 | ); |
| 2041 | |
| 2042 | exit: |
| 2043 | if (_array) { |
| 2044 | releasePointer(_env, _array, params, JNI_FALSE); |
| 2045 | } |
| 2046 | } |
| 2047 | |
| 2048 | /* void glLightf ( GLenum light, GLenum pname, GLfloat param ) */ |
| 2049 | static void |
| 2050 | android_glLightf__IIF |
| 2051 | (JNIEnv *_env, jobject _this, jint light, jint pname, jfloat param) { |
| 2052 | glLightf( |
| 2053 | (GLenum)light, |
| 2054 | (GLenum)pname, |
| 2055 | (GLfloat)param |
| 2056 | ); |
| 2057 | } |
| 2058 | |
| 2059 | /* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */ |
| 2060 | static void |
| 2061 | android_glLightfv__II_3FI |
| 2062 | (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) { |
| 2063 | GLfloat *params_base = (GLfloat *) 0; |
| 2064 | jint _remaining; |
| 2065 | GLfloat *params = (GLfloat *) 0; |
| 2066 | |
| 2067 | if (!params_ref) { |
| 2068 | _env->ThrowNew(IAEClass, "params == null"); |
| 2069 | goto exit; |
| 2070 | } |
| 2071 | if (offset < 0) { |
| 2072 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 2073 | goto exit; |
| 2074 | } |
| 2075 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2076 | int _needed; |
| 2077 | switch (pname) { |
| 2078 | #if defined(GL_SPOT_EXPONENT) |
| 2079 | case GL_SPOT_EXPONENT: |
| 2080 | #endif // defined(GL_SPOT_EXPONENT) |
| 2081 | #if defined(GL_SPOT_CUTOFF) |
| 2082 | case GL_SPOT_CUTOFF: |
| 2083 | #endif // defined(GL_SPOT_CUTOFF) |
| 2084 | #if defined(GL_CONSTANT_ATTENUATION) |
| 2085 | case GL_CONSTANT_ATTENUATION: |
| 2086 | #endif // defined(GL_CONSTANT_ATTENUATION) |
| 2087 | #if defined(GL_LINEAR_ATTENUATION) |
| 2088 | case GL_LINEAR_ATTENUATION: |
| 2089 | #endif // defined(GL_LINEAR_ATTENUATION) |
| 2090 | #if defined(GL_QUADRATIC_ATTENUATION) |
| 2091 | case GL_QUADRATIC_ATTENUATION: |
| 2092 | #endif // defined(GL_QUADRATIC_ATTENUATION) |
| 2093 | _needed = 1; |
| 2094 | break; |
| 2095 | #if defined(GL_SPOT_DIRECTION) |
| 2096 | case GL_SPOT_DIRECTION: |
| 2097 | #endif // defined(GL_SPOT_DIRECTION) |
| 2098 | _needed = 3; |
| 2099 | break; |
| 2100 | #if defined(GL_AMBIENT) |
| 2101 | case GL_AMBIENT: |
| 2102 | #endif // defined(GL_AMBIENT) |
| 2103 | #if defined(GL_DIFFUSE) |
| 2104 | case GL_DIFFUSE: |
| 2105 | #endif // defined(GL_DIFFUSE) |
| 2106 | #if defined(GL_SPECULAR) |
| 2107 | case GL_SPECULAR: |
| 2108 | #endif // defined(GL_SPECULAR) |
| 2109 | #if defined(GL_EMISSION) |
| 2110 | case GL_EMISSION: |
| 2111 | #endif // defined(GL_EMISSION) |
| 2112 | _needed = 4; |
| 2113 | break; |
| 2114 | default: |
| 2115 | _needed = 0; |
| 2116 | break; |
| 2117 | } |
| 2118 | if (_remaining < _needed) { |
| 2119 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 2120 | goto exit; |
| 2121 | } |
| 2122 | params_base = (GLfloat *) |
| 2123 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2124 | params = params_base + offset; |
| 2125 | |
| 2126 | glLightfv( |
| 2127 | (GLenum)light, |
| 2128 | (GLenum)pname, |
| 2129 | (GLfloat *)params |
| 2130 | ); |
| 2131 | |
| 2132 | exit: |
| 2133 | if (params_base) { |
| 2134 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2135 | JNI_ABORT); |
| 2136 | } |
| 2137 | } |
| 2138 | |
| 2139 | /* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */ |
| 2140 | static void |
| 2141 | android_glLightfv__IILjava_nio_FloatBuffer_2 |
| 2142 | (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { |
| 2143 | jarray _array = (jarray) 0; |
| 2144 | jint _remaining; |
| 2145 | GLfloat *params = (GLfloat *) 0; |
| 2146 | |
| 2147 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2148 | int _needed; |
| 2149 | switch (pname) { |
| 2150 | #if defined(GL_SPOT_EXPONENT) |
| 2151 | case GL_SPOT_EXPONENT: |
| 2152 | #endif // defined(GL_SPOT_EXPONENT) |
| 2153 | #if defined(GL_SPOT_CUTOFF) |
| 2154 | case GL_SPOT_CUTOFF: |
| 2155 | #endif // defined(GL_SPOT_CUTOFF) |
| 2156 | #if defined(GL_CONSTANT_ATTENUATION) |
| 2157 | case GL_CONSTANT_ATTENUATION: |
| 2158 | #endif // defined(GL_CONSTANT_ATTENUATION) |
| 2159 | #if defined(GL_LINEAR_ATTENUATION) |
| 2160 | case GL_LINEAR_ATTENUATION: |
| 2161 | #endif // defined(GL_LINEAR_ATTENUATION) |
| 2162 | #if defined(GL_QUADRATIC_ATTENUATION) |
| 2163 | case GL_QUADRATIC_ATTENUATION: |
| 2164 | #endif // defined(GL_QUADRATIC_ATTENUATION) |
| 2165 | _needed = 1; |
| 2166 | break; |
| 2167 | #if defined(GL_SPOT_DIRECTION) |
| 2168 | case GL_SPOT_DIRECTION: |
| 2169 | #endif // defined(GL_SPOT_DIRECTION) |
| 2170 | _needed = 3; |
| 2171 | break; |
| 2172 | #if defined(GL_AMBIENT) |
| 2173 | case GL_AMBIENT: |
| 2174 | #endif // defined(GL_AMBIENT) |
| 2175 | #if defined(GL_DIFFUSE) |
| 2176 | case GL_DIFFUSE: |
| 2177 | #endif // defined(GL_DIFFUSE) |
| 2178 | #if defined(GL_SPECULAR) |
| 2179 | case GL_SPECULAR: |
| 2180 | #endif // defined(GL_SPECULAR) |
| 2181 | #if defined(GL_EMISSION) |
| 2182 | case GL_EMISSION: |
| 2183 | #endif // defined(GL_EMISSION) |
| 2184 | _needed = 4; |
| 2185 | break; |
| 2186 | default: |
| 2187 | _needed = 0; |
| 2188 | break; |
| 2189 | } |
| 2190 | if (_remaining < _needed) { |
| 2191 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 2192 | goto exit; |
| 2193 | } |
| 2194 | glLightfv( |
| 2195 | (GLenum)light, |
| 2196 | (GLenum)pname, |
| 2197 | (GLfloat *)params |
| 2198 | ); |
| 2199 | |
| 2200 | exit: |
| 2201 | if (_array) { |
| 2202 | releasePointer(_env, _array, params, JNI_FALSE); |
| 2203 | } |
| 2204 | } |
| 2205 | |
| 2206 | /* void glLightx ( GLenum light, GLenum pname, GLfixed param ) */ |
| 2207 | static void |
| 2208 | android_glLightx__III |
| 2209 | (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) { |
| 2210 | glLightx( |
| 2211 | (GLenum)light, |
| 2212 | (GLenum)pname, |
| 2213 | (GLfixed)param |
| 2214 | ); |
| 2215 | } |
| 2216 | |
| 2217 | /* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */ |
| 2218 | static void |
| 2219 | android_glLightxv__II_3II |
| 2220 | (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) { |
| 2221 | GLfixed *params_base = (GLfixed *) 0; |
| 2222 | jint _remaining; |
| 2223 | GLfixed *params = (GLfixed *) 0; |
| 2224 | |
| 2225 | if (!params_ref) { |
| 2226 | _env->ThrowNew(IAEClass, "params == null"); |
| 2227 | goto exit; |
| 2228 | } |
| 2229 | if (offset < 0) { |
| 2230 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 2231 | goto exit; |
| 2232 | } |
| 2233 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2234 | int _needed; |
| 2235 | switch (pname) { |
| 2236 | #if defined(GL_SPOT_EXPONENT) |
| 2237 | case GL_SPOT_EXPONENT: |
| 2238 | #endif // defined(GL_SPOT_EXPONENT) |
| 2239 | #if defined(GL_SPOT_CUTOFF) |
| 2240 | case GL_SPOT_CUTOFF: |
| 2241 | #endif // defined(GL_SPOT_CUTOFF) |
| 2242 | #if defined(GL_CONSTANT_ATTENUATION) |
| 2243 | case GL_CONSTANT_ATTENUATION: |
| 2244 | #endif // defined(GL_CONSTANT_ATTENUATION) |
| 2245 | #if defined(GL_LINEAR_ATTENUATION) |
| 2246 | case GL_LINEAR_ATTENUATION: |
| 2247 | #endif // defined(GL_LINEAR_ATTENUATION) |
| 2248 | #if defined(GL_QUADRATIC_ATTENUATION) |
| 2249 | case GL_QUADRATIC_ATTENUATION: |
| 2250 | #endif // defined(GL_QUADRATIC_ATTENUATION) |
| 2251 | _needed = 1; |
| 2252 | break; |
| 2253 | #if defined(GL_SPOT_DIRECTION) |
| 2254 | case GL_SPOT_DIRECTION: |
| 2255 | #endif // defined(GL_SPOT_DIRECTION) |
| 2256 | _needed = 3; |
| 2257 | break; |
| 2258 | #if defined(GL_AMBIENT) |
| 2259 | case GL_AMBIENT: |
| 2260 | #endif // defined(GL_AMBIENT) |
| 2261 | #if defined(GL_DIFFUSE) |
| 2262 | case GL_DIFFUSE: |
| 2263 | #endif // defined(GL_DIFFUSE) |
| 2264 | #if defined(GL_SPECULAR) |
| 2265 | case GL_SPECULAR: |
| 2266 | #endif // defined(GL_SPECULAR) |
| 2267 | #if defined(GL_EMISSION) |
| 2268 | case GL_EMISSION: |
| 2269 | #endif // defined(GL_EMISSION) |
| 2270 | _needed = 4; |
| 2271 | break; |
| 2272 | default: |
| 2273 | _needed = 0; |
| 2274 | break; |
| 2275 | } |
| 2276 | if (_remaining < _needed) { |
| 2277 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 2278 | goto exit; |
| 2279 | } |
| 2280 | params_base = (GLfixed *) |
| 2281 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2282 | params = params_base + offset; |
| 2283 | |
| 2284 | glLightxv( |
| 2285 | (GLenum)light, |
| 2286 | (GLenum)pname, |
| 2287 | (GLfixed *)params |
| 2288 | ); |
| 2289 | |
| 2290 | exit: |
| 2291 | if (params_base) { |
| 2292 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2293 | JNI_ABORT); |
| 2294 | } |
| 2295 | } |
| 2296 | |
| 2297 | /* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */ |
| 2298 | static void |
| 2299 | android_glLightxv__IILjava_nio_IntBuffer_2 |
| 2300 | (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { |
| 2301 | jarray _array = (jarray) 0; |
| 2302 | jint _remaining; |
| 2303 | GLfixed *params = (GLfixed *) 0; |
| 2304 | |
| 2305 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2306 | int _needed; |
| 2307 | switch (pname) { |
| 2308 | #if defined(GL_SPOT_EXPONENT) |
| 2309 | case GL_SPOT_EXPONENT: |
| 2310 | #endif // defined(GL_SPOT_EXPONENT) |
| 2311 | #if defined(GL_SPOT_CUTOFF) |
| 2312 | case GL_SPOT_CUTOFF: |
| 2313 | #endif // defined(GL_SPOT_CUTOFF) |
| 2314 | #if defined(GL_CONSTANT_ATTENUATION) |
| 2315 | case GL_CONSTANT_ATTENUATION: |
| 2316 | #endif // defined(GL_CONSTANT_ATTENUATION) |
| 2317 | #if defined(GL_LINEAR_ATTENUATION) |
| 2318 | case GL_LINEAR_ATTENUATION: |
| 2319 | #endif // defined(GL_LINEAR_ATTENUATION) |
| 2320 | #if defined(GL_QUADRATIC_ATTENUATION) |
| 2321 | case GL_QUADRATIC_ATTENUATION: |
| 2322 | #endif // defined(GL_QUADRATIC_ATTENUATION) |
| 2323 | _needed = 1; |
| 2324 | break; |
| 2325 | #if defined(GL_SPOT_DIRECTION) |
| 2326 | case GL_SPOT_DIRECTION: |
| 2327 | #endif // defined(GL_SPOT_DIRECTION) |
| 2328 | _needed = 3; |
| 2329 | break; |
| 2330 | #if defined(GL_AMBIENT) |
| 2331 | case GL_AMBIENT: |
| 2332 | #endif // defined(GL_AMBIENT) |
| 2333 | #if defined(GL_DIFFUSE) |
| 2334 | case GL_DIFFUSE: |
| 2335 | #endif // defined(GL_DIFFUSE) |
| 2336 | #if defined(GL_SPECULAR) |
| 2337 | case GL_SPECULAR: |
| 2338 | #endif // defined(GL_SPECULAR) |
| 2339 | #if defined(GL_EMISSION) |
| 2340 | case GL_EMISSION: |
| 2341 | #endif // defined(GL_EMISSION) |
| 2342 | _needed = 4; |
| 2343 | break; |
| 2344 | default: |
| 2345 | _needed = 0; |
| 2346 | break; |
| 2347 | } |
| 2348 | if (_remaining < _needed) { |
| 2349 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 2350 | goto exit; |
| 2351 | } |
| 2352 | glLightxv( |
| 2353 | (GLenum)light, |
| 2354 | (GLenum)pname, |
| 2355 | (GLfixed *)params |
| 2356 | ); |
| 2357 | |
| 2358 | exit: |
| 2359 | if (_array) { |
| 2360 | releasePointer(_env, _array, params, JNI_FALSE); |
| 2361 | } |
| 2362 | } |
| 2363 | |
| 2364 | /* void glLineWidth ( GLfloat width ) */ |
| 2365 | static void |
| 2366 | android_glLineWidth__F |
| 2367 | (JNIEnv *_env, jobject _this, jfloat width) { |
| 2368 | glLineWidth( |
| 2369 | (GLfloat)width |
| 2370 | ); |
| 2371 | } |
| 2372 | |
| 2373 | /* void glLineWidthx ( GLfixed width ) */ |
| 2374 | static void |
| 2375 | android_glLineWidthx__I |
| 2376 | (JNIEnv *_env, jobject _this, jint width) { |
| 2377 | glLineWidthx( |
| 2378 | (GLfixed)width |
| 2379 | ); |
| 2380 | } |
| 2381 | |
| 2382 | /* void glLoadIdentity ( void ) */ |
| 2383 | static void |
| 2384 | android_glLoadIdentity__ |
| 2385 | (JNIEnv *_env, jobject _this) { |
| 2386 | glLoadIdentity(); |
| 2387 | } |
| 2388 | |
| 2389 | /* void glLoadMatrixf ( const GLfloat *m ) */ |
| 2390 | static void |
| 2391 | android_glLoadMatrixf___3FI |
| 2392 | (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) { |
| 2393 | GLfloat *m_base = (GLfloat *) 0; |
| 2394 | jint _remaining; |
| 2395 | GLfloat *m = (GLfloat *) 0; |
| 2396 | |
| 2397 | if (!m_ref) { |
| 2398 | _env->ThrowNew(IAEClass, "m == null"); |
| 2399 | goto exit; |
| 2400 | } |
| 2401 | if (offset < 0) { |
| 2402 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 2403 | goto exit; |
| 2404 | } |
| 2405 | _remaining = _env->GetArrayLength(m_ref) - offset; |
| 2406 | m_base = (GLfloat *) |
| 2407 | _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0); |
| 2408 | m = m_base + offset; |
| 2409 | |
| 2410 | glLoadMatrixf( |
| 2411 | (GLfloat *)m |
| 2412 | ); |
| 2413 | |
| 2414 | exit: |
| 2415 | if (m_base) { |
| 2416 | _env->ReleasePrimitiveArrayCritical(m_ref, m_base, |
| 2417 | JNI_ABORT); |
| 2418 | } |
| 2419 | } |
| 2420 | |
| 2421 | /* void glLoadMatrixf ( const GLfloat *m ) */ |
| 2422 | static void |
| 2423 | android_glLoadMatrixf__Ljava_nio_FloatBuffer_2 |
| 2424 | (JNIEnv *_env, jobject _this, jobject m_buf) { |
| 2425 | jarray _array = (jarray) 0; |
| 2426 | jint _remaining; |
| 2427 | GLfloat *m = (GLfloat *) 0; |
| 2428 | |
| 2429 | m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining); |
| 2430 | glLoadMatrixf( |
| 2431 | (GLfloat *)m |
| 2432 | ); |
| 2433 | if (_array) { |
| 2434 | releasePointer(_env, _array, m, JNI_FALSE); |
| 2435 | } |
| 2436 | } |
| 2437 | |
| 2438 | /* void glLoadMatrixx ( const GLfixed *m ) */ |
| 2439 | static void |
| 2440 | android_glLoadMatrixx___3II |
| 2441 | (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { |
| 2442 | GLfixed *m_base = (GLfixed *) 0; |
| 2443 | jint _remaining; |
| 2444 | GLfixed *m = (GLfixed *) 0; |
| 2445 | |
| 2446 | if (!m_ref) { |
| 2447 | _env->ThrowNew(IAEClass, "m == null"); |
| 2448 | goto exit; |
| 2449 | } |
| 2450 | if (offset < 0) { |
| 2451 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 2452 | goto exit; |
| 2453 | } |
| 2454 | _remaining = _env->GetArrayLength(m_ref) - offset; |
| 2455 | m_base = (GLfixed *) |
| 2456 | _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0); |
| 2457 | m = m_base + offset; |
| 2458 | |
| 2459 | glLoadMatrixx( |
| 2460 | (GLfixed *)m |
| 2461 | ); |
| 2462 | |
| 2463 | exit: |
| 2464 | if (m_base) { |
| 2465 | _env->ReleasePrimitiveArrayCritical(m_ref, m_base, |
| 2466 | JNI_ABORT); |
| 2467 | } |
| 2468 | } |
| 2469 | |
| 2470 | /* void glLoadMatrixx ( const GLfixed *m ) */ |
| 2471 | static void |
| 2472 | android_glLoadMatrixx__Ljava_nio_IntBuffer_2 |
| 2473 | (JNIEnv *_env, jobject _this, jobject m_buf) { |
| 2474 | jarray _array = (jarray) 0; |
| 2475 | jint _remaining; |
| 2476 | GLfixed *m = (GLfixed *) 0; |
| 2477 | |
| 2478 | m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining); |
| 2479 | glLoadMatrixx( |
| 2480 | (GLfixed *)m |
| 2481 | ); |
| 2482 | if (_array) { |
| 2483 | releasePointer(_env, _array, m, JNI_FALSE); |
| 2484 | } |
| 2485 | } |
| 2486 | |
| 2487 | /* void glLogicOp ( GLenum opcode ) */ |
| 2488 | static void |
| 2489 | android_glLogicOp__I |
| 2490 | (JNIEnv *_env, jobject _this, jint opcode) { |
| 2491 | glLogicOp( |
| 2492 | (GLenum)opcode |
| 2493 | ); |
| 2494 | } |
| 2495 | |
| 2496 | /* void glMaterialf ( GLenum face, GLenum pname, GLfloat param ) */ |
| 2497 | static void |
| 2498 | android_glMaterialf__IIF |
| 2499 | (JNIEnv *_env, jobject _this, jint face, jint pname, jfloat param) { |
| 2500 | glMaterialf( |
| 2501 | (GLenum)face, |
| 2502 | (GLenum)pname, |
| 2503 | (GLfloat)param |
| 2504 | ); |
| 2505 | } |
| 2506 | |
| 2507 | /* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */ |
| 2508 | static void |
| 2509 | android_glMaterialfv__II_3FI |
| 2510 | (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) { |
| 2511 | GLfloat *params_base = (GLfloat *) 0; |
| 2512 | jint _remaining; |
| 2513 | GLfloat *params = (GLfloat *) 0; |
| 2514 | |
| 2515 | if (!params_ref) { |
| 2516 | _env->ThrowNew(IAEClass, "params == null"); |
| 2517 | goto exit; |
| 2518 | } |
| 2519 | if (offset < 0) { |
| 2520 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 2521 | goto exit; |
| 2522 | } |
| 2523 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2524 | int _needed; |
| 2525 | switch (pname) { |
| 2526 | #if defined(GL_SHININESS) |
| 2527 | case GL_SHININESS: |
| 2528 | #endif // defined(GL_SHININESS) |
| 2529 | _needed = 1; |
| 2530 | break; |
| 2531 | #if defined(GL_AMBIENT) |
| 2532 | case GL_AMBIENT: |
| 2533 | #endif // defined(GL_AMBIENT) |
| 2534 | #if defined(GL_DIFFUSE) |
| 2535 | case GL_DIFFUSE: |
| 2536 | #endif // defined(GL_DIFFUSE) |
| 2537 | #if defined(GL_SPECULAR) |
| 2538 | case GL_SPECULAR: |
| 2539 | #endif // defined(GL_SPECULAR) |
| 2540 | #if defined(GL_EMISSION) |
| 2541 | case GL_EMISSION: |
| 2542 | #endif // defined(GL_EMISSION) |
| 2543 | #if defined(GL_AMBIENT_AND_DIFFUSE) |
| 2544 | case GL_AMBIENT_AND_DIFFUSE: |
| 2545 | #endif // defined(GL_AMBIENT_AND_DIFFUSE) |
| 2546 | _needed = 4; |
| 2547 | break; |
| 2548 | default: |
| 2549 | _needed = 0; |
| 2550 | break; |
| 2551 | } |
| 2552 | if (_remaining < _needed) { |
| 2553 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 2554 | goto exit; |
| 2555 | } |
| 2556 | params_base = (GLfloat *) |
| 2557 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2558 | params = params_base + offset; |
| 2559 | |
| 2560 | glMaterialfv( |
| 2561 | (GLenum)face, |
| 2562 | (GLenum)pname, |
| 2563 | (GLfloat *)params |
| 2564 | ); |
| 2565 | |
| 2566 | exit: |
| 2567 | if (params_base) { |
| 2568 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2569 | JNI_ABORT); |
| 2570 | } |
| 2571 | } |
| 2572 | |
| 2573 | /* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */ |
| 2574 | static void |
| 2575 | android_glMaterialfv__IILjava_nio_FloatBuffer_2 |
| 2576 | (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { |
| 2577 | jarray _array = (jarray) 0; |
| 2578 | jint _remaining; |
| 2579 | GLfloat *params = (GLfloat *) 0; |
| 2580 | |
| 2581 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2582 | int _needed; |
| 2583 | switch (pname) { |
| 2584 | #if defined(GL_SHININESS) |
| 2585 | case GL_SHININESS: |
| 2586 | #endif // defined(GL_SHININESS) |
| 2587 | _needed = 1; |
| 2588 | break; |
| 2589 | #if defined(GL_AMBIENT) |
| 2590 | case GL_AMBIENT: |
| 2591 | #endif // defined(GL_AMBIENT) |
| 2592 | #if defined(GL_DIFFUSE) |
| 2593 | case GL_DIFFUSE: |
| 2594 | #endif // defined(GL_DIFFUSE) |
| 2595 | #if defined(GL_SPECULAR) |
| 2596 | case GL_SPECULAR: |
| 2597 | #endif // defined(GL_SPECULAR) |
| 2598 | #if defined(GL_EMISSION) |
| 2599 | case GL_EMISSION: |
| 2600 | #endif // defined(GL_EMISSION) |
| 2601 | #if defined(GL_AMBIENT_AND_DIFFUSE) |
| 2602 | case GL_AMBIENT_AND_DIFFUSE: |
| 2603 | #endif // defined(GL_AMBIENT_AND_DIFFUSE) |
| 2604 | _needed = 4; |
| 2605 | break; |
| 2606 | default: |
| 2607 | _needed = 0; |
| 2608 | break; |
| 2609 | } |
| 2610 | if (_remaining < _needed) { |
| 2611 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 2612 | goto exit; |
| 2613 | } |
| 2614 | glMaterialfv( |
| 2615 | (GLenum)face, |
| 2616 | (GLenum)pname, |
| 2617 | (GLfloat *)params |
| 2618 | ); |
| 2619 | |
| 2620 | exit: |
| 2621 | if (_array) { |
| 2622 | releasePointer(_env, _array, params, JNI_FALSE); |
| 2623 | } |
| 2624 | } |
| 2625 | |
| 2626 | /* void glMaterialx ( GLenum face, GLenum pname, GLfixed param ) */ |
| 2627 | static void |
| 2628 | android_glMaterialx__III |
| 2629 | (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) { |
| 2630 | glMaterialx( |
| 2631 | (GLenum)face, |
| 2632 | (GLenum)pname, |
| 2633 | (GLfixed)param |
| 2634 | ); |
| 2635 | } |
| 2636 | |
| 2637 | /* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */ |
| 2638 | static void |
| 2639 | android_glMaterialxv__II_3II |
| 2640 | (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) { |
| 2641 | GLfixed *params_base = (GLfixed *) 0; |
| 2642 | jint _remaining; |
| 2643 | GLfixed *params = (GLfixed *) 0; |
| 2644 | |
| 2645 | if (!params_ref) { |
| 2646 | _env->ThrowNew(IAEClass, "params == null"); |
| 2647 | goto exit; |
| 2648 | } |
| 2649 | if (offset < 0) { |
| 2650 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 2651 | goto exit; |
| 2652 | } |
| 2653 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 2654 | int _needed; |
| 2655 | switch (pname) { |
| 2656 | #if defined(GL_SHININESS) |
| 2657 | case GL_SHININESS: |
| 2658 | #endif // defined(GL_SHININESS) |
| 2659 | _needed = 1; |
| 2660 | break; |
| 2661 | #if defined(GL_AMBIENT) |
| 2662 | case GL_AMBIENT: |
| 2663 | #endif // defined(GL_AMBIENT) |
| 2664 | #if defined(GL_DIFFUSE) |
| 2665 | case GL_DIFFUSE: |
| 2666 | #endif // defined(GL_DIFFUSE) |
| 2667 | #if defined(GL_SPECULAR) |
| 2668 | case GL_SPECULAR: |
| 2669 | #endif // defined(GL_SPECULAR) |
| 2670 | #if defined(GL_EMISSION) |
| 2671 | case GL_EMISSION: |
| 2672 | #endif // defined(GL_EMISSION) |
| 2673 | #if defined(GL_AMBIENT_AND_DIFFUSE) |
| 2674 | case GL_AMBIENT_AND_DIFFUSE: |
| 2675 | #endif // defined(GL_AMBIENT_AND_DIFFUSE) |
| 2676 | _needed = 4; |
| 2677 | break; |
| 2678 | default: |
| 2679 | _needed = 0; |
| 2680 | break; |
| 2681 | } |
| 2682 | if (_remaining < _needed) { |
| 2683 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 2684 | goto exit; |
| 2685 | } |
| 2686 | params_base = (GLfixed *) |
| 2687 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 2688 | params = params_base + offset; |
| 2689 | |
| 2690 | glMaterialxv( |
| 2691 | (GLenum)face, |
| 2692 | (GLenum)pname, |
| 2693 | (GLfixed *)params |
| 2694 | ); |
| 2695 | |
| 2696 | exit: |
| 2697 | if (params_base) { |
| 2698 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 2699 | JNI_ABORT); |
| 2700 | } |
| 2701 | } |
| 2702 | |
| 2703 | /* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */ |
| 2704 | static void |
| 2705 | android_glMaterialxv__IILjava_nio_IntBuffer_2 |
| 2706 | (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { |
| 2707 | jarray _array = (jarray) 0; |
| 2708 | jint _remaining; |
| 2709 | GLfixed *params = (GLfixed *) 0; |
| 2710 | |
| 2711 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 2712 | int _needed; |
| 2713 | switch (pname) { |
| 2714 | #if defined(GL_SHININESS) |
| 2715 | case GL_SHININESS: |
| 2716 | #endif // defined(GL_SHININESS) |
| 2717 | _needed = 1; |
| 2718 | break; |
| 2719 | #if defined(GL_AMBIENT) |
| 2720 | case GL_AMBIENT: |
| 2721 | #endif // defined(GL_AMBIENT) |
| 2722 | #if defined(GL_DIFFUSE) |
| 2723 | case GL_DIFFUSE: |
| 2724 | #endif // defined(GL_DIFFUSE) |
| 2725 | #if defined(GL_SPECULAR) |
| 2726 | case GL_SPECULAR: |
| 2727 | #endif // defined(GL_SPECULAR) |
| 2728 | #if defined(GL_EMISSION) |
| 2729 | case GL_EMISSION: |
| 2730 | #endif // defined(GL_EMISSION) |
| 2731 | #if defined(GL_AMBIENT_AND_DIFFUSE) |
| 2732 | case GL_AMBIENT_AND_DIFFUSE: |
| 2733 | #endif // defined(GL_AMBIENT_AND_DIFFUSE) |
| 2734 | _needed = 4; |
| 2735 | break; |
| 2736 | default: |
| 2737 | _needed = 0; |
| 2738 | break; |
| 2739 | } |
| 2740 | if (_remaining < _needed) { |
| 2741 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 2742 | goto exit; |
| 2743 | } |
| 2744 | glMaterialxv( |
| 2745 | (GLenum)face, |
| 2746 | (GLenum)pname, |
| 2747 | (GLfixed *)params |
| 2748 | ); |
| 2749 | |
| 2750 | exit: |
| 2751 | if (_array) { |
| 2752 | releasePointer(_env, _array, params, JNI_FALSE); |
| 2753 | } |
| 2754 | } |
| 2755 | |
| 2756 | /* void glMatrixMode ( GLenum mode ) */ |
| 2757 | static void |
| 2758 | android_glMatrixMode__I |
| 2759 | (JNIEnv *_env, jobject _this, jint mode) { |
| 2760 | glMatrixMode( |
| 2761 | (GLenum)mode |
| 2762 | ); |
| 2763 | } |
| 2764 | |
| 2765 | /* void glMultMatrixf ( const GLfloat *m ) */ |
| 2766 | static void |
| 2767 | android_glMultMatrixf___3FI |
| 2768 | (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) { |
| 2769 | GLfloat *m_base = (GLfloat *) 0; |
| 2770 | jint _remaining; |
| 2771 | GLfloat *m = (GLfloat *) 0; |
| 2772 | |
| 2773 | if (!m_ref) { |
| 2774 | _env->ThrowNew(IAEClass, "m == null"); |
| 2775 | goto exit; |
| 2776 | } |
| 2777 | if (offset < 0) { |
| 2778 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 2779 | goto exit; |
| 2780 | } |
| 2781 | _remaining = _env->GetArrayLength(m_ref) - offset; |
| 2782 | m_base = (GLfloat *) |
| 2783 | _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0); |
| 2784 | m = m_base + offset; |
| 2785 | |
| 2786 | glMultMatrixf( |
| 2787 | (GLfloat *)m |
| 2788 | ); |
| 2789 | |
| 2790 | exit: |
| 2791 | if (m_base) { |
| 2792 | _env->ReleasePrimitiveArrayCritical(m_ref, m_base, |
| 2793 | JNI_ABORT); |
| 2794 | } |
| 2795 | } |
| 2796 | |
| 2797 | /* void glMultMatrixf ( const GLfloat *m ) */ |
| 2798 | static void |
| 2799 | android_glMultMatrixf__Ljava_nio_FloatBuffer_2 |
| 2800 | (JNIEnv *_env, jobject _this, jobject m_buf) { |
| 2801 | jarray _array = (jarray) 0; |
| 2802 | jint _remaining; |
| 2803 | GLfloat *m = (GLfloat *) 0; |
| 2804 | |
| 2805 | m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining); |
| 2806 | glMultMatrixf( |
| 2807 | (GLfloat *)m |
| 2808 | ); |
| 2809 | if (_array) { |
| 2810 | releasePointer(_env, _array, m, JNI_FALSE); |
| 2811 | } |
| 2812 | } |
| 2813 | |
| 2814 | /* void glMultMatrixx ( const GLfixed *m ) */ |
| 2815 | static void |
| 2816 | android_glMultMatrixx___3II |
| 2817 | (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { |
| 2818 | GLfixed *m_base = (GLfixed *) 0; |
| 2819 | jint _remaining; |
| 2820 | GLfixed *m = (GLfixed *) 0; |
| 2821 | |
| 2822 | if (!m_ref) { |
| 2823 | _env->ThrowNew(IAEClass, "m == null"); |
| 2824 | goto exit; |
| 2825 | } |
| 2826 | if (offset < 0) { |
| 2827 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 2828 | goto exit; |
| 2829 | } |
| 2830 | _remaining = _env->GetArrayLength(m_ref) - offset; |
| 2831 | m_base = (GLfixed *) |
| 2832 | _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0); |
| 2833 | m = m_base + offset; |
| 2834 | |
| 2835 | glMultMatrixx( |
| 2836 | (GLfixed *)m |
| 2837 | ); |
| 2838 | |
| 2839 | exit: |
| 2840 | if (m_base) { |
| 2841 | _env->ReleasePrimitiveArrayCritical(m_ref, m_base, |
| 2842 | JNI_ABORT); |
| 2843 | } |
| 2844 | } |
| 2845 | |
| 2846 | /* void glMultMatrixx ( const GLfixed *m ) */ |
| 2847 | static void |
| 2848 | android_glMultMatrixx__Ljava_nio_IntBuffer_2 |
| 2849 | (JNIEnv *_env, jobject _this, jobject m_buf) { |
| 2850 | jarray _array = (jarray) 0; |
| 2851 | jint _remaining; |
| 2852 | GLfixed *m = (GLfixed *) 0; |
| 2853 | |
| 2854 | m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining); |
| 2855 | glMultMatrixx( |
| 2856 | (GLfixed *)m |
| 2857 | ); |
| 2858 | if (_array) { |
| 2859 | releasePointer(_env, _array, m, JNI_FALSE); |
| 2860 | } |
| 2861 | } |
| 2862 | |
| 2863 | /* void glMultiTexCoord4f ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ) */ |
| 2864 | static void |
| 2865 | android_glMultiTexCoord4f__IFFFF |
| 2866 | (JNIEnv *_env, jobject _this, jint target, jfloat s, jfloat t, jfloat r, jfloat q) { |
| 2867 | glMultiTexCoord4f( |
| 2868 | (GLenum)target, |
| 2869 | (GLfloat)s, |
| 2870 | (GLfloat)t, |
| 2871 | (GLfloat)r, |
| 2872 | (GLfloat)q |
| 2873 | ); |
| 2874 | } |
| 2875 | |
| 2876 | /* void glMultiTexCoord4x ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */ |
| 2877 | static void |
| 2878 | android_glMultiTexCoord4x__IIIII |
| 2879 | (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) { |
| 2880 | glMultiTexCoord4x( |
| 2881 | (GLenum)target, |
| 2882 | (GLfixed)s, |
| 2883 | (GLfixed)t, |
| 2884 | (GLfixed)r, |
| 2885 | (GLfixed)q |
| 2886 | ); |
| 2887 | } |
| 2888 | |
| 2889 | /* void glNormal3f ( GLfloat nx, GLfloat ny, GLfloat nz ) */ |
| 2890 | static void |
| 2891 | android_glNormal3f__FFF |
| 2892 | (JNIEnv *_env, jobject _this, jfloat nx, jfloat ny, jfloat nz) { |
| 2893 | glNormal3f( |
| 2894 | (GLfloat)nx, |
| 2895 | (GLfloat)ny, |
| 2896 | (GLfloat)nz |
| 2897 | ); |
| 2898 | } |
| 2899 | |
| 2900 | /* void glNormal3x ( GLfixed nx, GLfixed ny, GLfixed nz ) */ |
| 2901 | static void |
| 2902 | android_glNormal3x__III |
| 2903 | (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) { |
| 2904 | glNormal3x( |
| 2905 | (GLfixed)nx, |
| 2906 | (GLfixed)ny, |
| 2907 | (GLfixed)nz |
| 2908 | ); |
| 2909 | } |
| 2910 | |
| 2911 | /* void glNormalPointer ( GLenum type, GLsizei stride, const GLvoid *pointer ) */ |
| 2912 | static void |
| 2913 | android_glNormalPointerBounds__IILjava_nio_Buffer_2I |
| 2914 | (JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) { |
| 2915 | jarray _array = (jarray) 0; |
| 2916 | jint _remaining; |
| 2917 | GLvoid *pointer = (GLvoid *) 0; |
| 2918 | |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 2919 | if (pointer_buf) { |
Jack Palevich | 16e7972 | 2009-05-15 18:13:34 -0700 | [diff] [blame] | 2920 | pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 2921 | if ( ! pointer ) { |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 2922 | return; |
| 2923 | } |
| 2924 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2925 | glNormalPointerBounds( |
| 2926 | (GLenum)type, |
| 2927 | (GLsizei)stride, |
| 2928 | (GLvoid *)pointer, |
| 2929 | (GLsizei)remaining |
| 2930 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2931 | } |
| 2932 | |
| 2933 | /* void glOrthof ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */ |
| 2934 | static void |
| 2935 | android_glOrthof__FFFFFF |
| 2936 | (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) { |
| 2937 | glOrthof( |
| 2938 | (GLfloat)left, |
| 2939 | (GLfloat)right, |
| 2940 | (GLfloat)bottom, |
| 2941 | (GLfloat)top, |
| 2942 | (GLfloat)zNear, |
| 2943 | (GLfloat)zFar |
| 2944 | ); |
| 2945 | } |
| 2946 | |
| 2947 | /* void glOrthox ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */ |
| 2948 | static void |
| 2949 | android_glOrthox__IIIIII |
| 2950 | (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) { |
| 2951 | glOrthox( |
| 2952 | (GLfixed)left, |
| 2953 | (GLfixed)right, |
| 2954 | (GLfixed)bottom, |
| 2955 | (GLfixed)top, |
| 2956 | (GLfixed)zNear, |
| 2957 | (GLfixed)zFar |
| 2958 | ); |
| 2959 | } |
| 2960 | |
| 2961 | /* void glPixelStorei ( GLenum pname, GLint param ) */ |
| 2962 | static void |
| 2963 | android_glPixelStorei__II |
| 2964 | (JNIEnv *_env, jobject _this, jint pname, jint param) { |
| 2965 | glPixelStorei( |
| 2966 | (GLenum)pname, |
| 2967 | (GLint)param |
| 2968 | ); |
| 2969 | } |
| 2970 | |
| 2971 | /* void glPointSize ( GLfloat size ) */ |
| 2972 | static void |
| 2973 | android_glPointSize__F |
| 2974 | (JNIEnv *_env, jobject _this, jfloat size) { |
| 2975 | glPointSize( |
| 2976 | (GLfloat)size |
| 2977 | ); |
| 2978 | } |
| 2979 | |
| 2980 | /* void glPointSizex ( GLfixed size ) */ |
| 2981 | static void |
| 2982 | android_glPointSizex__I |
| 2983 | (JNIEnv *_env, jobject _this, jint size) { |
| 2984 | glPointSizex( |
| 2985 | (GLfixed)size |
| 2986 | ); |
| 2987 | } |
| 2988 | |
| 2989 | /* void glPolygonOffset ( GLfloat factor, GLfloat units ) */ |
| 2990 | static void |
| 2991 | android_glPolygonOffset__FF |
| 2992 | (JNIEnv *_env, jobject _this, jfloat factor, jfloat units) { |
| 2993 | glPolygonOffset( |
| 2994 | (GLfloat)factor, |
| 2995 | (GLfloat)units |
| 2996 | ); |
| 2997 | } |
| 2998 | |
| 2999 | /* void glPolygonOffsetx ( GLfixed factor, GLfixed units ) */ |
| 3000 | static void |
| 3001 | android_glPolygonOffsetx__II |
| 3002 | (JNIEnv *_env, jobject _this, jint factor, jint units) { |
| 3003 | glPolygonOffsetx( |
| 3004 | (GLfixed)factor, |
| 3005 | (GLfixed)units |
| 3006 | ); |
| 3007 | } |
| 3008 | |
| 3009 | /* void glPopMatrix ( void ) */ |
| 3010 | static void |
| 3011 | android_glPopMatrix__ |
| 3012 | (JNIEnv *_env, jobject _this) { |
| 3013 | glPopMatrix(); |
| 3014 | } |
| 3015 | |
| 3016 | /* void glPushMatrix ( void ) */ |
| 3017 | static void |
| 3018 | android_glPushMatrix__ |
| 3019 | (JNIEnv *_env, jobject _this) { |
| 3020 | glPushMatrix(); |
| 3021 | } |
| 3022 | |
| 3023 | /* void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) */ |
| 3024 | static void |
| 3025 | android_glReadPixels__IIIIIILjava_nio_Buffer_2 |
| 3026 | (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) { |
| 3027 | jint _exception = 0; |
| 3028 | jarray _array = (jarray) 0; |
| 3029 | jint _remaining; |
| 3030 | GLvoid *pixels = (GLvoid *) 0; |
| 3031 | |
| 3032 | pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining); |
| 3033 | glReadPixels( |
| 3034 | (GLint)x, |
| 3035 | (GLint)y, |
| 3036 | (GLsizei)width, |
| 3037 | (GLsizei)height, |
| 3038 | (GLenum)format, |
| 3039 | (GLenum)type, |
| 3040 | (GLvoid *)pixels |
| 3041 | ); |
| 3042 | if (_array) { |
| 3043 | releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE); |
| 3044 | } |
| 3045 | } |
| 3046 | |
| 3047 | /* void glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) */ |
| 3048 | static void |
| 3049 | android_glRotatef__FFFF |
| 3050 | (JNIEnv *_env, jobject _this, jfloat angle, jfloat x, jfloat y, jfloat z) { |
| 3051 | glRotatef( |
| 3052 | (GLfloat)angle, |
| 3053 | (GLfloat)x, |
| 3054 | (GLfloat)y, |
| 3055 | (GLfloat)z |
| 3056 | ); |
| 3057 | } |
| 3058 | |
| 3059 | /* void glRotatex ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */ |
| 3060 | static void |
| 3061 | android_glRotatex__IIII |
| 3062 | (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) { |
| 3063 | glRotatex( |
| 3064 | (GLfixed)angle, |
| 3065 | (GLfixed)x, |
| 3066 | (GLfixed)y, |
| 3067 | (GLfixed)z |
| 3068 | ); |
| 3069 | } |
| 3070 | |
| 3071 | /* void glSampleCoverage ( GLclampf value, GLboolean invert ) */ |
| 3072 | static void |
| 3073 | android_glSampleCoverage__FZ |
| 3074 | (JNIEnv *_env, jobject _this, jfloat value, jboolean invert) { |
| 3075 | glSampleCoverage( |
| 3076 | (GLclampf)value, |
| 3077 | (GLboolean)invert |
| 3078 | ); |
| 3079 | } |
| 3080 | |
| 3081 | /* void glSampleCoveragex ( GLclampx value, GLboolean invert ) */ |
| 3082 | static void |
| 3083 | android_glSampleCoveragex__IZ |
| 3084 | (JNIEnv *_env, jobject _this, jint value, jboolean invert) { |
| 3085 | glSampleCoveragex( |
| 3086 | (GLclampx)value, |
| 3087 | (GLboolean)invert |
| 3088 | ); |
| 3089 | } |
| 3090 | |
| 3091 | /* void glScalef ( GLfloat x, GLfloat y, GLfloat z ) */ |
| 3092 | static void |
| 3093 | android_glScalef__FFF |
| 3094 | (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z) { |
| 3095 | glScalef( |
| 3096 | (GLfloat)x, |
| 3097 | (GLfloat)y, |
| 3098 | (GLfloat)z |
| 3099 | ); |
| 3100 | } |
| 3101 | |
| 3102 | /* void glScalex ( GLfixed x, GLfixed y, GLfixed z ) */ |
| 3103 | static void |
| 3104 | android_glScalex__III |
| 3105 | (JNIEnv *_env, jobject _this, jint x, jint y, jint z) { |
| 3106 | glScalex( |
| 3107 | (GLfixed)x, |
| 3108 | (GLfixed)y, |
| 3109 | (GLfixed)z |
| 3110 | ); |
| 3111 | } |
| 3112 | |
| 3113 | /* void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) */ |
| 3114 | static void |
| 3115 | android_glScissor__IIII |
| 3116 | (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) { |
| 3117 | glScissor( |
| 3118 | (GLint)x, |
| 3119 | (GLint)y, |
| 3120 | (GLsizei)width, |
| 3121 | (GLsizei)height |
| 3122 | ); |
| 3123 | } |
| 3124 | |
| 3125 | /* void glShadeModel ( GLenum mode ) */ |
| 3126 | static void |
| 3127 | android_glShadeModel__I |
| 3128 | (JNIEnv *_env, jobject _this, jint mode) { |
| 3129 | glShadeModel( |
| 3130 | (GLenum)mode |
| 3131 | ); |
| 3132 | } |
| 3133 | |
| 3134 | /* void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) */ |
| 3135 | static void |
| 3136 | android_glStencilFunc__III |
| 3137 | (JNIEnv *_env, jobject _this, jint func, jint ref, jint mask) { |
| 3138 | glStencilFunc( |
| 3139 | (GLenum)func, |
| 3140 | (GLint)ref, |
| 3141 | (GLuint)mask |
| 3142 | ); |
| 3143 | } |
| 3144 | |
| 3145 | /* void glStencilMask ( GLuint mask ) */ |
| 3146 | static void |
| 3147 | android_glStencilMask__I |
| 3148 | (JNIEnv *_env, jobject _this, jint mask) { |
| 3149 | glStencilMask( |
| 3150 | (GLuint)mask |
| 3151 | ); |
| 3152 | } |
| 3153 | |
| 3154 | /* void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) */ |
| 3155 | static void |
| 3156 | android_glStencilOp__III |
| 3157 | (JNIEnv *_env, jobject _this, jint fail, jint zfail, jint zpass) { |
| 3158 | glStencilOp( |
| 3159 | (GLenum)fail, |
| 3160 | (GLenum)zfail, |
| 3161 | (GLenum)zpass |
| 3162 | ); |
| 3163 | } |
| 3164 | |
| 3165 | /* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */ |
| 3166 | static void |
| 3167 | android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I |
| 3168 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) { |
| 3169 | jarray _array = (jarray) 0; |
| 3170 | jint _remaining; |
| 3171 | GLvoid *pointer = (GLvoid *) 0; |
| 3172 | |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 3173 | if (pointer_buf) { |
Jack Palevich | 16e7972 | 2009-05-15 18:13:34 -0700 | [diff] [blame] | 3174 | pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 3175 | if ( ! pointer ) { |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 3176 | return; |
| 3177 | } |
| 3178 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3179 | glTexCoordPointerBounds( |
| 3180 | (GLint)size, |
| 3181 | (GLenum)type, |
| 3182 | (GLsizei)stride, |
| 3183 | (GLvoid *)pointer, |
| 3184 | (GLsizei)remaining |
| 3185 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3186 | } |
| 3187 | |
| 3188 | /* void glTexEnvf ( GLenum target, GLenum pname, GLfloat param ) */ |
| 3189 | static void |
| 3190 | android_glTexEnvf__IIF |
| 3191 | (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) { |
| 3192 | glTexEnvf( |
| 3193 | (GLenum)target, |
| 3194 | (GLenum)pname, |
| 3195 | (GLfloat)param |
| 3196 | ); |
| 3197 | } |
| 3198 | |
| 3199 | /* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */ |
| 3200 | static void |
| 3201 | android_glTexEnvfv__II_3FI |
| 3202 | (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { |
| 3203 | GLfloat *params_base = (GLfloat *) 0; |
| 3204 | jint _remaining; |
| 3205 | GLfloat *params = (GLfloat *) 0; |
| 3206 | |
| 3207 | if (!params_ref) { |
| 3208 | _env->ThrowNew(IAEClass, "params == null"); |
| 3209 | goto exit; |
| 3210 | } |
| 3211 | if (offset < 0) { |
| 3212 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 3213 | goto exit; |
| 3214 | } |
| 3215 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 3216 | int _needed; |
| 3217 | switch (pname) { |
| 3218 | #if defined(GL_TEXTURE_ENV_MODE) |
| 3219 | case GL_TEXTURE_ENV_MODE: |
| 3220 | #endif // defined(GL_TEXTURE_ENV_MODE) |
| 3221 | #if defined(GL_COMBINE_RGB) |
| 3222 | case GL_COMBINE_RGB: |
| 3223 | #endif // defined(GL_COMBINE_RGB) |
| 3224 | #if defined(GL_COMBINE_ALPHA) |
| 3225 | case GL_COMBINE_ALPHA: |
| 3226 | #endif // defined(GL_COMBINE_ALPHA) |
| 3227 | _needed = 1; |
| 3228 | break; |
| 3229 | #if defined(GL_TEXTURE_ENV_COLOR) |
| 3230 | case GL_TEXTURE_ENV_COLOR: |
| 3231 | #endif // defined(GL_TEXTURE_ENV_COLOR) |
| 3232 | _needed = 4; |
| 3233 | break; |
| 3234 | default: |
| 3235 | _needed = 0; |
| 3236 | break; |
| 3237 | } |
| 3238 | if (_remaining < _needed) { |
| 3239 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 3240 | goto exit; |
| 3241 | } |
| 3242 | params_base = (GLfloat *) |
| 3243 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 3244 | params = params_base + offset; |
| 3245 | |
| 3246 | glTexEnvfv( |
| 3247 | (GLenum)target, |
| 3248 | (GLenum)pname, |
| 3249 | (GLfloat *)params |
| 3250 | ); |
| 3251 | |
| 3252 | exit: |
| 3253 | if (params_base) { |
| 3254 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 3255 | JNI_ABORT); |
| 3256 | } |
| 3257 | } |
| 3258 | |
| 3259 | /* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */ |
| 3260 | static void |
| 3261 | android_glTexEnvfv__IILjava_nio_FloatBuffer_2 |
| 3262 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
| 3263 | jarray _array = (jarray) 0; |
| 3264 | jint _remaining; |
| 3265 | GLfloat *params = (GLfloat *) 0; |
| 3266 | |
| 3267 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 3268 | int _needed; |
| 3269 | switch (pname) { |
| 3270 | #if defined(GL_TEXTURE_ENV_MODE) |
| 3271 | case GL_TEXTURE_ENV_MODE: |
| 3272 | #endif // defined(GL_TEXTURE_ENV_MODE) |
| 3273 | #if defined(GL_COMBINE_RGB) |
| 3274 | case GL_COMBINE_RGB: |
| 3275 | #endif // defined(GL_COMBINE_RGB) |
| 3276 | #if defined(GL_COMBINE_ALPHA) |
| 3277 | case GL_COMBINE_ALPHA: |
| 3278 | #endif // defined(GL_COMBINE_ALPHA) |
| 3279 | _needed = 1; |
| 3280 | break; |
| 3281 | #if defined(GL_TEXTURE_ENV_COLOR) |
| 3282 | case GL_TEXTURE_ENV_COLOR: |
| 3283 | #endif // defined(GL_TEXTURE_ENV_COLOR) |
| 3284 | _needed = 4; |
| 3285 | break; |
| 3286 | default: |
| 3287 | _needed = 0; |
| 3288 | break; |
| 3289 | } |
| 3290 | if (_remaining < _needed) { |
| 3291 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 3292 | goto exit; |
| 3293 | } |
| 3294 | glTexEnvfv( |
| 3295 | (GLenum)target, |
| 3296 | (GLenum)pname, |
| 3297 | (GLfloat *)params |
| 3298 | ); |
| 3299 | |
| 3300 | exit: |
| 3301 | if (_array) { |
| 3302 | releasePointer(_env, _array, params, JNI_FALSE); |
| 3303 | } |
| 3304 | } |
| 3305 | |
| 3306 | /* void glTexEnvx ( GLenum target, GLenum pname, GLfixed param ) */ |
| 3307 | static void |
| 3308 | android_glTexEnvx__III |
| 3309 | (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) { |
| 3310 | glTexEnvx( |
| 3311 | (GLenum)target, |
| 3312 | (GLenum)pname, |
| 3313 | (GLfixed)param |
| 3314 | ); |
| 3315 | } |
| 3316 | |
| 3317 | /* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */ |
| 3318 | static void |
| 3319 | android_glTexEnvxv__II_3II |
| 3320 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 3321 | GLfixed *params_base = (GLfixed *) 0; |
| 3322 | jint _remaining; |
| 3323 | GLfixed *params = (GLfixed *) 0; |
| 3324 | |
| 3325 | if (!params_ref) { |
| 3326 | _env->ThrowNew(IAEClass, "params == null"); |
| 3327 | goto exit; |
| 3328 | } |
| 3329 | if (offset < 0) { |
| 3330 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 3331 | goto exit; |
| 3332 | } |
| 3333 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 3334 | int _needed; |
| 3335 | switch (pname) { |
| 3336 | #if defined(GL_TEXTURE_ENV_MODE) |
| 3337 | case GL_TEXTURE_ENV_MODE: |
| 3338 | #endif // defined(GL_TEXTURE_ENV_MODE) |
| 3339 | #if defined(GL_COMBINE_RGB) |
| 3340 | case GL_COMBINE_RGB: |
| 3341 | #endif // defined(GL_COMBINE_RGB) |
| 3342 | #if defined(GL_COMBINE_ALPHA) |
| 3343 | case GL_COMBINE_ALPHA: |
| 3344 | #endif // defined(GL_COMBINE_ALPHA) |
| 3345 | _needed = 1; |
| 3346 | break; |
| 3347 | #if defined(GL_TEXTURE_ENV_COLOR) |
| 3348 | case GL_TEXTURE_ENV_COLOR: |
| 3349 | #endif // defined(GL_TEXTURE_ENV_COLOR) |
| 3350 | _needed = 4; |
| 3351 | break; |
| 3352 | default: |
| 3353 | _needed = 0; |
| 3354 | break; |
| 3355 | } |
| 3356 | if (_remaining < _needed) { |
| 3357 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 3358 | goto exit; |
| 3359 | } |
| 3360 | params_base = (GLfixed *) |
| 3361 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 3362 | params = params_base + offset; |
| 3363 | |
| 3364 | glTexEnvxv( |
| 3365 | (GLenum)target, |
| 3366 | (GLenum)pname, |
| 3367 | (GLfixed *)params |
| 3368 | ); |
| 3369 | |
| 3370 | exit: |
| 3371 | if (params_base) { |
| 3372 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 3373 | JNI_ABORT); |
| 3374 | } |
| 3375 | } |
| 3376 | |
| 3377 | /* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */ |
| 3378 | static void |
| 3379 | android_glTexEnvxv__IILjava_nio_IntBuffer_2 |
| 3380 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
| 3381 | jarray _array = (jarray) 0; |
| 3382 | jint _remaining; |
| 3383 | GLfixed *params = (GLfixed *) 0; |
| 3384 | |
| 3385 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 3386 | int _needed; |
| 3387 | switch (pname) { |
| 3388 | #if defined(GL_TEXTURE_ENV_MODE) |
| 3389 | case GL_TEXTURE_ENV_MODE: |
| 3390 | #endif // defined(GL_TEXTURE_ENV_MODE) |
| 3391 | #if defined(GL_COMBINE_RGB) |
| 3392 | case GL_COMBINE_RGB: |
| 3393 | #endif // defined(GL_COMBINE_RGB) |
| 3394 | #if defined(GL_COMBINE_ALPHA) |
| 3395 | case GL_COMBINE_ALPHA: |
| 3396 | #endif // defined(GL_COMBINE_ALPHA) |
| 3397 | _needed = 1; |
| 3398 | break; |
| 3399 | #if defined(GL_TEXTURE_ENV_COLOR) |
| 3400 | case GL_TEXTURE_ENV_COLOR: |
| 3401 | #endif // defined(GL_TEXTURE_ENV_COLOR) |
| 3402 | _needed = 4; |
| 3403 | break; |
| 3404 | default: |
| 3405 | _needed = 0; |
| 3406 | break; |
| 3407 | } |
| 3408 | if (_remaining < _needed) { |
| 3409 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 3410 | goto exit; |
| 3411 | } |
| 3412 | glTexEnvxv( |
| 3413 | (GLenum)target, |
| 3414 | (GLenum)pname, |
| 3415 | (GLfixed *)params |
| 3416 | ); |
| 3417 | |
| 3418 | exit: |
| 3419 | if (_array) { |
| 3420 | releasePointer(_env, _array, params, JNI_FALSE); |
| 3421 | } |
| 3422 | } |
| 3423 | |
| 3424 | /* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */ |
| 3425 | static void |
| 3426 | android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 |
| 3427 | (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) { |
| 3428 | jarray _array = (jarray) 0; |
| 3429 | jint _remaining; |
| 3430 | GLvoid *pixels = (GLvoid *) 0; |
| 3431 | |
| 3432 | if (pixels_buf) { |
| 3433 | pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining); |
| 3434 | } |
| 3435 | glTexImage2D( |
| 3436 | (GLenum)target, |
| 3437 | (GLint)level, |
| 3438 | (GLint)internalformat, |
| 3439 | (GLsizei)width, |
| 3440 | (GLsizei)height, |
| 3441 | (GLint)border, |
| 3442 | (GLenum)format, |
| 3443 | (GLenum)type, |
| 3444 | (GLvoid *)pixels |
| 3445 | ); |
| 3446 | if (_array) { |
| 3447 | releasePointer(_env, _array, pixels, JNI_FALSE); |
| 3448 | } |
| 3449 | } |
| 3450 | |
| 3451 | /* void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) */ |
| 3452 | static void |
| 3453 | android_glTexParameterf__IIF |
| 3454 | (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) { |
| 3455 | glTexParameterf( |
| 3456 | (GLenum)target, |
| 3457 | (GLenum)pname, |
| 3458 | (GLfloat)param |
| 3459 | ); |
| 3460 | } |
| 3461 | |
| 3462 | /* void glTexParameterx ( GLenum target, GLenum pname, GLfixed param ) */ |
| 3463 | static void |
| 3464 | android_glTexParameterx__III |
| 3465 | (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) { |
| 3466 | glTexParameterx( |
| 3467 | (GLenum)target, |
| 3468 | (GLenum)pname, |
| 3469 | (GLfixed)param |
| 3470 | ); |
| 3471 | } |
| 3472 | |
| 3473 | /* void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) */ |
| 3474 | static void |
| 3475 | android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 |
| 3476 | (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) { |
| 3477 | jarray _array = (jarray) 0; |
| 3478 | jint _remaining; |
| 3479 | GLvoid *pixels = (GLvoid *) 0; |
| 3480 | |
| 3481 | if (pixels_buf) { |
| 3482 | pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining); |
| 3483 | } |
| 3484 | glTexSubImage2D( |
| 3485 | (GLenum)target, |
| 3486 | (GLint)level, |
| 3487 | (GLint)xoffset, |
| 3488 | (GLint)yoffset, |
| 3489 | (GLsizei)width, |
| 3490 | (GLsizei)height, |
| 3491 | (GLenum)format, |
| 3492 | (GLenum)type, |
| 3493 | (GLvoid *)pixels |
| 3494 | ); |
| 3495 | if (_array) { |
| 3496 | releasePointer(_env, _array, pixels, JNI_FALSE); |
| 3497 | } |
| 3498 | } |
| 3499 | |
| 3500 | /* void glTranslatef ( GLfloat x, GLfloat y, GLfloat z ) */ |
| 3501 | static void |
| 3502 | android_glTranslatef__FFF |
| 3503 | (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z) { |
| 3504 | glTranslatef( |
| 3505 | (GLfloat)x, |
| 3506 | (GLfloat)y, |
| 3507 | (GLfloat)z |
| 3508 | ); |
| 3509 | } |
| 3510 | |
| 3511 | /* void glTranslatex ( GLfixed x, GLfixed y, GLfixed z ) */ |
| 3512 | static void |
| 3513 | android_glTranslatex__III |
| 3514 | (JNIEnv *_env, jobject _this, jint x, jint y, jint z) { |
| 3515 | glTranslatex( |
| 3516 | (GLfixed)x, |
| 3517 | (GLfixed)y, |
| 3518 | (GLfixed)z |
| 3519 | ); |
| 3520 | } |
| 3521 | |
| 3522 | /* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */ |
| 3523 | static void |
| 3524 | android_glVertexPointerBounds__IIILjava_nio_Buffer_2I |
| 3525 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) { |
| 3526 | jarray _array = (jarray) 0; |
| 3527 | jint _remaining; |
| 3528 | GLvoid *pointer = (GLvoid *) 0; |
| 3529 | |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 3530 | if (pointer_buf) { |
Jack Palevich | 16e7972 | 2009-05-15 18:13:34 -0700 | [diff] [blame] | 3531 | pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 3532 | if ( ! pointer ) { |
Jack Palevich | e20ea78 | 2009-05-07 18:28:29 -0700 | [diff] [blame] | 3533 | return; |
| 3534 | } |
| 3535 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3536 | glVertexPointerBounds( |
| 3537 | (GLint)size, |
| 3538 | (GLenum)type, |
| 3539 | (GLsizei)stride, |
| 3540 | (GLvoid *)pointer, |
| 3541 | (GLsizei)remaining |
| 3542 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3543 | } |
| 3544 | |
| 3545 | /* void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) */ |
| 3546 | static void |
| 3547 | android_glViewport__IIII |
| 3548 | (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) { |
| 3549 | glViewport( |
| 3550 | (GLint)x, |
| 3551 | (GLint)y, |
| 3552 | (GLsizei)width, |
| 3553 | (GLsizei)height |
| 3554 | ); |
| 3555 | } |
| 3556 | |
| 3557 | /* GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent ) */ |
| 3558 | static jint |
| 3559 | android_glQueryMatrixxOES___3II_3II |
| 3560 | (JNIEnv *_env, jobject _this, jintArray mantissa_ref, jint mantissaOffset, jintArray exponent_ref, jint exponentOffset) { |
| 3561 | jint _exception = 0; |
| 3562 | GLbitfield _returnValue = -1; |
| 3563 | GLfixed *mantissa_base = (GLfixed *) 0; |
| 3564 | jint _mantissaRemaining; |
| 3565 | GLfixed *mantissa = (GLfixed *) 0; |
| 3566 | GLint *exponent_base = (GLint *) 0; |
| 3567 | jint _exponentRemaining; |
| 3568 | GLint *exponent = (GLint *) 0; |
| 3569 | |
| 3570 | if (!mantissa_ref) { |
| 3571 | _exception = 1; |
| 3572 | _env->ThrowNew(IAEClass, "mantissa == null"); |
| 3573 | goto exit; |
| 3574 | } |
| 3575 | if (mantissaOffset < 0) { |
| 3576 | _exception = 1; |
| 3577 | _env->ThrowNew(IAEClass, "mantissaOffset < 0"); |
| 3578 | goto exit; |
| 3579 | } |
| 3580 | _mantissaRemaining = _env->GetArrayLength(mantissa_ref) - mantissaOffset; |
| 3581 | if (_mantissaRemaining < 16) { |
| 3582 | _exception = 1; |
| 3583 | _env->ThrowNew(IAEClass, "length - mantissaOffset < 16"); |
| 3584 | goto exit; |
| 3585 | } |
| 3586 | mantissa_base = (GLfixed *) |
| 3587 | _env->GetPrimitiveArrayCritical(mantissa_ref, (jboolean *)0); |
| 3588 | mantissa = mantissa_base + mantissaOffset; |
| 3589 | |
| 3590 | if (!exponent_ref) { |
| 3591 | _exception = 1; |
| 3592 | _env->ThrowNew(IAEClass, "exponent == null"); |
| 3593 | goto exit; |
| 3594 | } |
| 3595 | if (exponentOffset < 0) { |
| 3596 | _exception = 1; |
| 3597 | _env->ThrowNew(IAEClass, "exponentOffset < 0"); |
| 3598 | goto exit; |
| 3599 | } |
| 3600 | _exponentRemaining = _env->GetArrayLength(exponent_ref) - exponentOffset; |
| 3601 | if (_exponentRemaining < 16) { |
| 3602 | _exception = 1; |
| 3603 | _env->ThrowNew(IAEClass, "length - exponentOffset < 16"); |
| 3604 | goto exit; |
| 3605 | } |
| 3606 | exponent_base = (GLint *) |
| 3607 | _env->GetPrimitiveArrayCritical(exponent_ref, (jboolean *)0); |
| 3608 | exponent = exponent_base + exponentOffset; |
| 3609 | |
| 3610 | _returnValue = glQueryMatrixxOES( |
| 3611 | (GLfixed *)mantissa, |
| 3612 | (GLint *)exponent |
| 3613 | ); |
| 3614 | |
| 3615 | exit: |
| 3616 | if (exponent_base) { |
| 3617 | _env->ReleasePrimitiveArrayCritical(exponent_ref, exponent_base, |
| 3618 | _exception ? JNI_ABORT: 0); |
| 3619 | } |
| 3620 | if (mantissa_base) { |
| 3621 | _env->ReleasePrimitiveArrayCritical(mantissa_ref, mantissa_base, |
| 3622 | _exception ? JNI_ABORT: 0); |
| 3623 | } |
| 3624 | return _returnValue; |
| 3625 | } |
| 3626 | |
| 3627 | /* GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent ) */ |
| 3628 | static jint |
| 3629 | android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 |
| 3630 | (JNIEnv *_env, jobject _this, jobject mantissa_buf, jobject exponent_buf) { |
| 3631 | jint _exception = 0; |
| 3632 | jarray _mantissaArray = (jarray) 0; |
| 3633 | jarray _exponentArray = (jarray) 0; |
| 3634 | GLbitfield _returnValue = -1; |
| 3635 | jint _mantissaRemaining; |
| 3636 | GLfixed *mantissa = (GLfixed *) 0; |
| 3637 | jint _exponentRemaining; |
| 3638 | GLint *exponent = (GLint *) 0; |
| 3639 | |
| 3640 | mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining); |
| 3641 | if (_mantissaRemaining < 16) { |
| 3642 | _exception = 1; |
| 3643 | _env->ThrowNew(IAEClass, "remaining() < 16"); |
| 3644 | goto exit; |
| 3645 | } |
| 3646 | exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining); |
| 3647 | if (_exponentRemaining < 16) { |
| 3648 | _exception = 1; |
| 3649 | _env->ThrowNew(IAEClass, "remaining() < 16"); |
| 3650 | goto exit; |
| 3651 | } |
| 3652 | _returnValue = glQueryMatrixxOES( |
| 3653 | (GLfixed *)mantissa, |
| 3654 | (GLint *)exponent |
| 3655 | ); |
| 3656 | |
| 3657 | exit: |
| 3658 | if (_mantissaArray) { |
| 3659 | releasePointer(_env, _mantissaArray, exponent, _exception ? JNI_FALSE : JNI_TRUE); |
| 3660 | } |
| 3661 | if (_exponentArray) { |
| 3662 | releasePointer(_env, _exponentArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE); |
| 3663 | } |
| 3664 | return _returnValue; |
| 3665 | } |
| 3666 | |
| 3667 | /* void glBindBuffer ( GLenum target, GLuint buffer ) */ |
| 3668 | static void |
| 3669 | android_glBindBuffer__II |
| 3670 | (JNIEnv *_env, jobject _this, jint target, jint buffer) { |
| 3671 | glBindBuffer( |
| 3672 | (GLenum)target, |
| 3673 | (GLuint)buffer |
| 3674 | ); |
| 3675 | } |
| 3676 | |
| 3677 | /* void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ) */ |
| 3678 | static void |
| 3679 | android_glBufferData__IILjava_nio_Buffer_2I |
| 3680 | (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) { |
| 3681 | jarray _array = (jarray) 0; |
| 3682 | jint _remaining; |
| 3683 | GLvoid *data = (GLvoid *) 0; |
| 3684 | |
| 3685 | if (data_buf) { |
| 3686 | data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); |
Jack Palevich | c620a52 | 2009-10-21 11:02:44 -0700 | [diff] [blame] | 3687 | if (_remaining < size) { |
| 3688 | _env->ThrowNew(IAEClass, "remaining() < size"); |
| 3689 | goto exit; |
| 3690 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3691 | } |
| 3692 | glBufferData( |
| 3693 | (GLenum)target, |
| 3694 | (GLsizeiptr)size, |
| 3695 | (GLvoid *)data, |
| 3696 | (GLenum)usage |
| 3697 | ); |
Jack Palevich | c620a52 | 2009-10-21 11:02:44 -0700 | [diff] [blame] | 3698 | |
| 3699 | exit: |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3700 | if (_array) { |
| 3701 | releasePointer(_env, _array, data, JNI_FALSE); |
| 3702 | } |
| 3703 | } |
| 3704 | |
| 3705 | /* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */ |
| 3706 | static void |
| 3707 | android_glBufferSubData__IIILjava_nio_Buffer_2 |
| 3708 | (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) { |
| 3709 | jarray _array = (jarray) 0; |
| 3710 | jint _remaining; |
| 3711 | GLvoid *data = (GLvoid *) 0; |
| 3712 | |
| 3713 | data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); |
Jack Palevich | c620a52 | 2009-10-21 11:02:44 -0700 | [diff] [blame] | 3714 | if (_remaining < size) { |
| 3715 | _env->ThrowNew(IAEClass, "remaining() < size"); |
| 3716 | goto exit; |
| 3717 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3718 | glBufferSubData( |
| 3719 | (GLenum)target, |
| 3720 | (GLintptr)offset, |
| 3721 | (GLsizeiptr)size, |
| 3722 | (GLvoid *)data |
| 3723 | ); |
Jack Palevich | c620a52 | 2009-10-21 11:02:44 -0700 | [diff] [blame] | 3724 | |
| 3725 | exit: |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3726 | if (_array) { |
| 3727 | releasePointer(_env, _array, data, JNI_FALSE); |
| 3728 | } |
| 3729 | } |
| 3730 | |
| 3731 | /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */ |
| 3732 | static void |
| 3733 | android_glClipPlanef__I_3FI |
| 3734 | (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) { |
| 3735 | GLfloat *equation_base = (GLfloat *) 0; |
| 3736 | jint _remaining; |
| 3737 | GLfloat *equation = (GLfloat *) 0; |
| 3738 | |
| 3739 | if (!equation_ref) { |
| 3740 | _env->ThrowNew(IAEClass, "equation == null"); |
| 3741 | goto exit; |
| 3742 | } |
| 3743 | if (offset < 0) { |
| 3744 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 3745 | goto exit; |
| 3746 | } |
| 3747 | _remaining = _env->GetArrayLength(equation_ref) - offset; |
| 3748 | if (_remaining < 4) { |
| 3749 | _env->ThrowNew(IAEClass, "length - offset < 4"); |
| 3750 | goto exit; |
| 3751 | } |
| 3752 | equation_base = (GLfloat *) |
| 3753 | _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0); |
| 3754 | equation = equation_base + offset; |
| 3755 | |
| 3756 | glClipPlanef( |
| 3757 | (GLenum)plane, |
| 3758 | (GLfloat *)equation |
| 3759 | ); |
| 3760 | |
| 3761 | exit: |
| 3762 | if (equation_base) { |
| 3763 | _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base, |
| 3764 | JNI_ABORT); |
| 3765 | } |
| 3766 | } |
| 3767 | |
| 3768 | /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */ |
| 3769 | static void |
| 3770 | android_glClipPlanef__ILjava_nio_FloatBuffer_2 |
| 3771 | (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) { |
| 3772 | jarray _array = (jarray) 0; |
| 3773 | jint _remaining; |
| 3774 | GLfloat *equation = (GLfloat *) 0; |
| 3775 | |
| 3776 | equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining); |
| 3777 | if (_remaining < 4) { |
| 3778 | _env->ThrowNew(IAEClass, "remaining() < 4"); |
| 3779 | goto exit; |
| 3780 | } |
| 3781 | glClipPlanef( |
| 3782 | (GLenum)plane, |
| 3783 | (GLfloat *)equation |
| 3784 | ); |
| 3785 | |
| 3786 | exit: |
| 3787 | if (_array) { |
| 3788 | releasePointer(_env, _array, equation, JNI_FALSE); |
| 3789 | } |
| 3790 | } |
| 3791 | |
| 3792 | /* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */ |
| 3793 | static void |
| 3794 | android_glClipPlanex__I_3II |
| 3795 | (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) { |
| 3796 | GLfixed *equation_base = (GLfixed *) 0; |
| 3797 | jint _remaining; |
| 3798 | GLfixed *equation = (GLfixed *) 0; |
| 3799 | |
| 3800 | if (!equation_ref) { |
| 3801 | _env->ThrowNew(IAEClass, "equation == null"); |
| 3802 | goto exit; |
| 3803 | } |
| 3804 | if (offset < 0) { |
| 3805 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 3806 | goto exit; |
| 3807 | } |
| 3808 | _remaining = _env->GetArrayLength(equation_ref) - offset; |
| 3809 | if (_remaining < 4) { |
| 3810 | _env->ThrowNew(IAEClass, "length - offset < 4"); |
| 3811 | goto exit; |
| 3812 | } |
| 3813 | equation_base = (GLfixed *) |
| 3814 | _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0); |
| 3815 | equation = equation_base + offset; |
| 3816 | |
| 3817 | glClipPlanex( |
| 3818 | (GLenum)plane, |
| 3819 | (GLfixed *)equation |
| 3820 | ); |
| 3821 | |
| 3822 | exit: |
| 3823 | if (equation_base) { |
| 3824 | _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base, |
| 3825 | JNI_ABORT); |
| 3826 | } |
| 3827 | } |
| 3828 | |
| 3829 | /* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */ |
| 3830 | static void |
| 3831 | android_glClipPlanex__ILjava_nio_IntBuffer_2 |
| 3832 | (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) { |
| 3833 | jarray _array = (jarray) 0; |
| 3834 | jint _remaining; |
| 3835 | GLfixed *equation = (GLfixed *) 0; |
| 3836 | |
| 3837 | equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining); |
| 3838 | if (_remaining < 4) { |
| 3839 | _env->ThrowNew(IAEClass, "remaining() < 4"); |
| 3840 | goto exit; |
| 3841 | } |
| 3842 | glClipPlanex( |
| 3843 | (GLenum)plane, |
| 3844 | (GLfixed *)equation |
| 3845 | ); |
| 3846 | |
| 3847 | exit: |
| 3848 | if (_array) { |
| 3849 | releasePointer(_env, _array, equation, JNI_FALSE); |
| 3850 | } |
| 3851 | } |
| 3852 | |
| 3853 | /* void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) */ |
| 3854 | static void |
| 3855 | android_glColor4ub__BBBB |
| 3856 | (JNIEnv *_env, jobject _this, jbyte red, jbyte green, jbyte blue, jbyte alpha) { |
| 3857 | glColor4ub( |
| 3858 | (GLubyte)red, |
| 3859 | (GLubyte)green, |
| 3860 | (GLubyte)blue, |
| 3861 | (GLubyte)alpha |
| 3862 | ); |
| 3863 | } |
| 3864 | |
| 3865 | /* void glColorPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */ |
| 3866 | static void |
| 3867 | android_glColorPointer__IIII |
| 3868 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) { |
| 3869 | glColorPointer( |
| 3870 | (GLint)size, |
| 3871 | (GLenum)type, |
| 3872 | (GLsizei)stride, |
| 3873 | (const GLvoid *)offset |
| 3874 | ); |
| 3875 | } |
| 3876 | |
| 3877 | /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */ |
| 3878 | static void |
| 3879 | android_glDeleteBuffers__I_3II |
| 3880 | (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) { |
| 3881 | GLuint *buffers_base = (GLuint *) 0; |
| 3882 | jint _remaining; |
| 3883 | GLuint *buffers = (GLuint *) 0; |
| 3884 | |
| 3885 | if (!buffers_ref) { |
| 3886 | _env->ThrowNew(IAEClass, "buffers == null"); |
| 3887 | goto exit; |
| 3888 | } |
| 3889 | if (offset < 0) { |
| 3890 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 3891 | goto exit; |
| 3892 | } |
| 3893 | _remaining = _env->GetArrayLength(buffers_ref) - offset; |
| 3894 | if (_remaining < n) { |
| 3895 | _env->ThrowNew(IAEClass, "length - offset < n"); |
| 3896 | goto exit; |
| 3897 | } |
| 3898 | buffers_base = (GLuint *) |
| 3899 | _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0); |
| 3900 | buffers = buffers_base + offset; |
| 3901 | |
| 3902 | glDeleteBuffers( |
| 3903 | (GLsizei)n, |
| 3904 | (GLuint *)buffers |
| 3905 | ); |
| 3906 | |
| 3907 | exit: |
| 3908 | if (buffers_base) { |
| 3909 | _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base, |
| 3910 | JNI_ABORT); |
| 3911 | } |
| 3912 | } |
| 3913 | |
| 3914 | /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */ |
| 3915 | static void |
| 3916 | android_glDeleteBuffers__ILjava_nio_IntBuffer_2 |
| 3917 | (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) { |
| 3918 | jarray _array = (jarray) 0; |
| 3919 | jint _remaining; |
| 3920 | GLuint *buffers = (GLuint *) 0; |
| 3921 | |
| 3922 | buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining); |
| 3923 | if (_remaining < n) { |
| 3924 | _env->ThrowNew(IAEClass, "remaining() < n"); |
| 3925 | goto exit; |
| 3926 | } |
| 3927 | glDeleteBuffers( |
| 3928 | (GLsizei)n, |
| 3929 | (GLuint *)buffers |
| 3930 | ); |
| 3931 | |
| 3932 | exit: |
| 3933 | if (_array) { |
| 3934 | releasePointer(_env, _array, buffers, JNI_FALSE); |
| 3935 | } |
| 3936 | } |
| 3937 | |
| 3938 | /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */ |
| 3939 | static void |
| 3940 | android_glDrawElements__IIII |
| 3941 | (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) { |
| 3942 | glDrawElements( |
| 3943 | (GLenum)mode, |
| 3944 | (GLsizei)count, |
| 3945 | (GLenum)type, |
| 3946 | (const GLvoid *)offset |
| 3947 | ); |
| 3948 | } |
| 3949 | |
| 3950 | /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */ |
| 3951 | static void |
| 3952 | android_glGenBuffers__I_3II |
| 3953 | (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) { |
| 3954 | jint _exception = 0; |
| 3955 | GLuint *buffers_base = (GLuint *) 0; |
| 3956 | jint _remaining; |
| 3957 | GLuint *buffers = (GLuint *) 0; |
| 3958 | |
| 3959 | if (!buffers_ref) { |
| 3960 | _exception = 1; |
| 3961 | _env->ThrowNew(IAEClass, "buffers == null"); |
| 3962 | goto exit; |
| 3963 | } |
| 3964 | if (offset < 0) { |
| 3965 | _exception = 1; |
| 3966 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 3967 | goto exit; |
| 3968 | } |
| 3969 | _remaining = _env->GetArrayLength(buffers_ref) - offset; |
| 3970 | if (_remaining < n) { |
| 3971 | _exception = 1; |
| 3972 | _env->ThrowNew(IAEClass, "length - offset < n"); |
| 3973 | goto exit; |
| 3974 | } |
| 3975 | buffers_base = (GLuint *) |
| 3976 | _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0); |
| 3977 | buffers = buffers_base + offset; |
| 3978 | |
| 3979 | glGenBuffers( |
| 3980 | (GLsizei)n, |
| 3981 | (GLuint *)buffers |
| 3982 | ); |
| 3983 | |
| 3984 | exit: |
| 3985 | if (buffers_base) { |
| 3986 | _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base, |
| 3987 | _exception ? JNI_ABORT: 0); |
| 3988 | } |
| 3989 | } |
| 3990 | |
| 3991 | /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */ |
| 3992 | static void |
| 3993 | android_glGenBuffers__ILjava_nio_IntBuffer_2 |
| 3994 | (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) { |
| 3995 | jint _exception = 0; |
| 3996 | jarray _array = (jarray) 0; |
| 3997 | jint _remaining; |
| 3998 | GLuint *buffers = (GLuint *) 0; |
| 3999 | |
| 4000 | buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining); |
| 4001 | if (_remaining < n) { |
| 4002 | _exception = 1; |
| 4003 | _env->ThrowNew(IAEClass, "remaining() < n"); |
| 4004 | goto exit; |
| 4005 | } |
| 4006 | glGenBuffers( |
| 4007 | (GLsizei)n, |
| 4008 | (GLuint *)buffers |
| 4009 | ); |
| 4010 | |
| 4011 | exit: |
| 4012 | if (_array) { |
| 4013 | releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE); |
| 4014 | } |
| 4015 | } |
| 4016 | |
| 4017 | /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ |
| 4018 | static void |
| 4019 | android_glGetBooleanv__I_3ZI |
| 4020 | (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) { |
| 4021 | jint _exception = 0; |
| 4022 | GLboolean *params_base = (GLboolean *) 0; |
| 4023 | jint _remaining; |
| 4024 | GLboolean *params = (GLboolean *) 0; |
| 4025 | |
| 4026 | if (!params_ref) { |
| 4027 | _exception = 1; |
| 4028 | _env->ThrowNew(IAEClass, "params == null"); |
| 4029 | goto exit; |
| 4030 | } |
| 4031 | if (offset < 0) { |
| 4032 | _exception = 1; |
| 4033 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4034 | goto exit; |
| 4035 | } |
| 4036 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 4037 | params_base = (GLboolean *) |
| 4038 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 4039 | params = params_base + offset; |
| 4040 | |
| 4041 | glGetBooleanv( |
| 4042 | (GLenum)pname, |
| 4043 | (GLboolean *)params |
| 4044 | ); |
| 4045 | |
| 4046 | exit: |
| 4047 | if (params_base) { |
| 4048 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 4049 | _exception ? JNI_ABORT: 0); |
| 4050 | } |
| 4051 | } |
| 4052 | |
| 4053 | /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ |
| 4054 | static void |
| 4055 | android_glGetBooleanv__ILjava_nio_IntBuffer_2 |
| 4056 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 4057 | jint _exception = 0; |
| 4058 | jarray _array = (jarray) 0; |
| 4059 | jint _remaining; |
| 4060 | GLboolean *params = (GLboolean *) 0; |
| 4061 | |
| 4062 | params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining); |
| 4063 | glGetBooleanv( |
| 4064 | (GLenum)pname, |
| 4065 | (GLboolean *)params |
| 4066 | ); |
| 4067 | if (_array) { |
| 4068 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 4069 | } |
| 4070 | } |
| 4071 | |
| 4072 | /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ |
| 4073 | static void |
| 4074 | android_glGetBufferParameteriv__II_3II |
| 4075 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 4076 | _env->ThrowNew(UOEClass, |
| 4077 | "glGetBufferParameteriv"); |
| 4078 | } |
| 4079 | |
| 4080 | /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ |
| 4081 | static void |
| 4082 | android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 |
| 4083 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
| 4084 | _env->ThrowNew(UOEClass, |
| 4085 | "glGetBufferParameteriv"); |
| 4086 | } |
| 4087 | |
| 4088 | /* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */ |
| 4089 | static void |
| 4090 | android_glGetClipPlanef__I_3FI |
| 4091 | (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) { |
| 4092 | jint _exception = 0; |
| 4093 | GLfloat *eqn_base = (GLfloat *) 0; |
| 4094 | jint _remaining; |
| 4095 | GLfloat *eqn = (GLfloat *) 0; |
| 4096 | |
| 4097 | if (!eqn_ref) { |
| 4098 | _exception = 1; |
| 4099 | _env->ThrowNew(IAEClass, "eqn == null"); |
| 4100 | goto exit; |
| 4101 | } |
| 4102 | if (offset < 0) { |
| 4103 | _exception = 1; |
| 4104 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4105 | goto exit; |
| 4106 | } |
| 4107 | _remaining = _env->GetArrayLength(eqn_ref) - offset; |
| 4108 | eqn_base = (GLfloat *) |
| 4109 | _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0); |
| 4110 | eqn = eqn_base + offset; |
| 4111 | |
| 4112 | glGetClipPlanef( |
| 4113 | (GLenum)pname, |
| 4114 | (GLfloat *)eqn |
| 4115 | ); |
| 4116 | |
| 4117 | exit: |
| 4118 | if (eqn_base) { |
| 4119 | _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base, |
| 4120 | _exception ? JNI_ABORT: 0); |
| 4121 | } |
| 4122 | } |
| 4123 | |
| 4124 | /* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */ |
| 4125 | static void |
| 4126 | android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 |
| 4127 | (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { |
| 4128 | jint _exception = 0; |
| 4129 | jarray _array = (jarray) 0; |
| 4130 | jint _remaining; |
| 4131 | GLfloat *eqn = (GLfloat *) 0; |
| 4132 | |
| 4133 | eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining); |
| 4134 | glGetClipPlanef( |
| 4135 | (GLenum)pname, |
| 4136 | (GLfloat *)eqn |
| 4137 | ); |
| 4138 | if (_array) { |
| 4139 | releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE); |
| 4140 | } |
| 4141 | } |
| 4142 | |
| 4143 | /* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */ |
| 4144 | static void |
| 4145 | android_glGetClipPlanex__I_3II |
| 4146 | (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) { |
| 4147 | jint _exception = 0; |
| 4148 | GLfixed *eqn_base = (GLfixed *) 0; |
| 4149 | jint _remaining; |
| 4150 | GLfixed *eqn = (GLfixed *) 0; |
| 4151 | |
| 4152 | if (!eqn_ref) { |
| 4153 | _exception = 1; |
| 4154 | _env->ThrowNew(IAEClass, "eqn == null"); |
| 4155 | goto exit; |
| 4156 | } |
| 4157 | if (offset < 0) { |
| 4158 | _exception = 1; |
| 4159 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4160 | goto exit; |
| 4161 | } |
| 4162 | _remaining = _env->GetArrayLength(eqn_ref) - offset; |
| 4163 | eqn_base = (GLfixed *) |
| 4164 | _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0); |
| 4165 | eqn = eqn_base + offset; |
| 4166 | |
| 4167 | glGetClipPlanex( |
| 4168 | (GLenum)pname, |
| 4169 | (GLfixed *)eqn |
| 4170 | ); |
| 4171 | |
| 4172 | exit: |
| 4173 | if (eqn_base) { |
| 4174 | _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base, |
| 4175 | _exception ? JNI_ABORT: 0); |
| 4176 | } |
| 4177 | } |
| 4178 | |
| 4179 | /* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */ |
| 4180 | static void |
| 4181 | android_glGetClipPlanex__ILjava_nio_IntBuffer_2 |
| 4182 | (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { |
| 4183 | jint _exception = 0; |
| 4184 | jarray _array = (jarray) 0; |
| 4185 | jint _remaining; |
| 4186 | GLfixed *eqn = (GLfixed *) 0; |
| 4187 | |
| 4188 | eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining); |
| 4189 | glGetClipPlanex( |
| 4190 | (GLenum)pname, |
| 4191 | (GLfixed *)eqn |
| 4192 | ); |
| 4193 | if (_array) { |
| 4194 | releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE); |
| 4195 | } |
| 4196 | } |
| 4197 | |
| 4198 | /* void glGetFixedv ( GLenum pname, GLfixed *params ) */ |
| 4199 | static void |
| 4200 | android_glGetFixedv__I_3II |
| 4201 | (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { |
| 4202 | jint _exception = 0; |
| 4203 | GLfixed *params_base = (GLfixed *) 0; |
| 4204 | jint _remaining; |
| 4205 | GLfixed *params = (GLfixed *) 0; |
| 4206 | |
| 4207 | if (!params_ref) { |
| 4208 | _exception = 1; |
| 4209 | _env->ThrowNew(IAEClass, "params == null"); |
| 4210 | goto exit; |
| 4211 | } |
| 4212 | if (offset < 0) { |
| 4213 | _exception = 1; |
| 4214 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4215 | goto exit; |
| 4216 | } |
| 4217 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 4218 | params_base = (GLfixed *) |
| 4219 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 4220 | params = params_base + offset; |
| 4221 | |
| 4222 | glGetFixedv( |
| 4223 | (GLenum)pname, |
| 4224 | (GLfixed *)params |
| 4225 | ); |
| 4226 | |
| 4227 | exit: |
| 4228 | if (params_base) { |
| 4229 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 4230 | _exception ? JNI_ABORT: 0); |
| 4231 | } |
| 4232 | } |
| 4233 | |
| 4234 | /* void glGetFixedv ( GLenum pname, GLfixed *params ) */ |
| 4235 | static void |
| 4236 | android_glGetFixedv__ILjava_nio_IntBuffer_2 |
| 4237 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 4238 | jint _exception = 0; |
| 4239 | jarray _array = (jarray) 0; |
| 4240 | jint _remaining; |
| 4241 | GLfixed *params = (GLfixed *) 0; |
| 4242 | |
| 4243 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 4244 | glGetFixedv( |
| 4245 | (GLenum)pname, |
| 4246 | (GLfixed *)params |
| 4247 | ); |
| 4248 | if (_array) { |
| 4249 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 4250 | } |
| 4251 | } |
| 4252 | |
| 4253 | /* void glGetFloatv ( GLenum pname, GLfloat *params ) */ |
| 4254 | static void |
| 4255 | android_glGetFloatv__I_3FI |
| 4256 | (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { |
| 4257 | jint _exception = 0; |
| 4258 | GLfloat *params_base = (GLfloat *) 0; |
| 4259 | jint _remaining; |
| 4260 | GLfloat *params = (GLfloat *) 0; |
| 4261 | |
| 4262 | if (!params_ref) { |
| 4263 | _exception = 1; |
| 4264 | _env->ThrowNew(IAEClass, "params == null"); |
| 4265 | goto exit; |
| 4266 | } |
| 4267 | if (offset < 0) { |
| 4268 | _exception = 1; |
| 4269 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4270 | goto exit; |
| 4271 | } |
| 4272 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 4273 | params_base = (GLfloat *) |
| 4274 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 4275 | params = params_base + offset; |
| 4276 | |
| 4277 | glGetFloatv( |
| 4278 | (GLenum)pname, |
| 4279 | (GLfloat *)params |
| 4280 | ); |
| 4281 | |
| 4282 | exit: |
| 4283 | if (params_base) { |
| 4284 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 4285 | _exception ? JNI_ABORT: 0); |
| 4286 | } |
| 4287 | } |
| 4288 | |
| 4289 | /* void glGetFloatv ( GLenum pname, GLfloat *params ) */ |
| 4290 | static void |
| 4291 | android_glGetFloatv__ILjava_nio_FloatBuffer_2 |
| 4292 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 4293 | jint _exception = 0; |
| 4294 | jarray _array = (jarray) 0; |
| 4295 | jint _remaining; |
| 4296 | GLfloat *params = (GLfloat *) 0; |
| 4297 | |
| 4298 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 4299 | glGetFloatv( |
| 4300 | (GLenum)pname, |
| 4301 | (GLfloat *)params |
| 4302 | ); |
| 4303 | if (_array) { |
| 4304 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 4305 | } |
| 4306 | } |
| 4307 | |
| 4308 | /* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */ |
| 4309 | static void |
| 4310 | android_glGetLightfv__II_3FI |
| 4311 | (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) { |
| 4312 | jint _exception = 0; |
| 4313 | GLfloat *params_base = (GLfloat *) 0; |
| 4314 | jint _remaining; |
| 4315 | GLfloat *params = (GLfloat *) 0; |
| 4316 | |
| 4317 | if (!params_ref) { |
| 4318 | _exception = 1; |
| 4319 | _env->ThrowNew(IAEClass, "params == null"); |
| 4320 | goto exit; |
| 4321 | } |
| 4322 | if (offset < 0) { |
| 4323 | _exception = 1; |
| 4324 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4325 | goto exit; |
| 4326 | } |
| 4327 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 4328 | int _needed; |
| 4329 | switch (pname) { |
| 4330 | #if defined(GL_SPOT_EXPONENT) |
| 4331 | case GL_SPOT_EXPONENT: |
| 4332 | #endif // defined(GL_SPOT_EXPONENT) |
| 4333 | #if defined(GL_SPOT_CUTOFF) |
| 4334 | case GL_SPOT_CUTOFF: |
| 4335 | #endif // defined(GL_SPOT_CUTOFF) |
| 4336 | #if defined(GL_CONSTANT_ATTENUATION) |
| 4337 | case GL_CONSTANT_ATTENUATION: |
| 4338 | #endif // defined(GL_CONSTANT_ATTENUATION) |
| 4339 | #if defined(GL_LINEAR_ATTENUATION) |
| 4340 | case GL_LINEAR_ATTENUATION: |
| 4341 | #endif // defined(GL_LINEAR_ATTENUATION) |
| 4342 | #if defined(GL_QUADRATIC_ATTENUATION) |
| 4343 | case GL_QUADRATIC_ATTENUATION: |
| 4344 | #endif // defined(GL_QUADRATIC_ATTENUATION) |
| 4345 | _needed = 1; |
| 4346 | break; |
| 4347 | #if defined(GL_SPOT_DIRECTION) |
| 4348 | case GL_SPOT_DIRECTION: |
| 4349 | #endif // defined(GL_SPOT_DIRECTION) |
| 4350 | _needed = 3; |
| 4351 | break; |
| 4352 | #if defined(GL_AMBIENT) |
| 4353 | case GL_AMBIENT: |
| 4354 | #endif // defined(GL_AMBIENT) |
| 4355 | #if defined(GL_DIFFUSE) |
| 4356 | case GL_DIFFUSE: |
| 4357 | #endif // defined(GL_DIFFUSE) |
| 4358 | #if defined(GL_SPECULAR) |
| 4359 | case GL_SPECULAR: |
| 4360 | #endif // defined(GL_SPECULAR) |
| 4361 | #if defined(GL_EMISSION) |
| 4362 | case GL_EMISSION: |
| 4363 | #endif // defined(GL_EMISSION) |
| 4364 | _needed = 4; |
| 4365 | break; |
| 4366 | default: |
| 4367 | _needed = 0; |
| 4368 | break; |
| 4369 | } |
| 4370 | if (_remaining < _needed) { |
| 4371 | _exception = 1; |
| 4372 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 4373 | goto exit; |
| 4374 | } |
| 4375 | params_base = (GLfloat *) |
| 4376 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 4377 | params = params_base + offset; |
| 4378 | |
| 4379 | glGetLightfv( |
| 4380 | (GLenum)light, |
| 4381 | (GLenum)pname, |
| 4382 | (GLfloat *)params |
| 4383 | ); |
| 4384 | |
| 4385 | exit: |
| 4386 | if (params_base) { |
| 4387 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 4388 | _exception ? JNI_ABORT: 0); |
| 4389 | } |
| 4390 | } |
| 4391 | |
| 4392 | /* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */ |
| 4393 | static void |
| 4394 | android_glGetLightfv__IILjava_nio_FloatBuffer_2 |
| 4395 | (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { |
| 4396 | jint _exception = 0; |
| 4397 | jarray _array = (jarray) 0; |
| 4398 | jint _remaining; |
| 4399 | GLfloat *params = (GLfloat *) 0; |
| 4400 | |
| 4401 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 4402 | int _needed; |
| 4403 | switch (pname) { |
| 4404 | #if defined(GL_SPOT_EXPONENT) |
| 4405 | case GL_SPOT_EXPONENT: |
| 4406 | #endif // defined(GL_SPOT_EXPONENT) |
| 4407 | #if defined(GL_SPOT_CUTOFF) |
| 4408 | case GL_SPOT_CUTOFF: |
| 4409 | #endif // defined(GL_SPOT_CUTOFF) |
| 4410 | #if defined(GL_CONSTANT_ATTENUATION) |
| 4411 | case GL_CONSTANT_ATTENUATION: |
| 4412 | #endif // defined(GL_CONSTANT_ATTENUATION) |
| 4413 | #if defined(GL_LINEAR_ATTENUATION) |
| 4414 | case GL_LINEAR_ATTENUATION: |
| 4415 | #endif // defined(GL_LINEAR_ATTENUATION) |
| 4416 | #if defined(GL_QUADRATIC_ATTENUATION) |
| 4417 | case GL_QUADRATIC_ATTENUATION: |
| 4418 | #endif // defined(GL_QUADRATIC_ATTENUATION) |
| 4419 | _needed = 1; |
| 4420 | break; |
| 4421 | #if defined(GL_SPOT_DIRECTION) |
| 4422 | case GL_SPOT_DIRECTION: |
| 4423 | #endif // defined(GL_SPOT_DIRECTION) |
| 4424 | _needed = 3; |
| 4425 | break; |
| 4426 | #if defined(GL_AMBIENT) |
| 4427 | case GL_AMBIENT: |
| 4428 | #endif // defined(GL_AMBIENT) |
| 4429 | #if defined(GL_DIFFUSE) |
| 4430 | case GL_DIFFUSE: |
| 4431 | #endif // defined(GL_DIFFUSE) |
| 4432 | #if defined(GL_SPECULAR) |
| 4433 | case GL_SPECULAR: |
| 4434 | #endif // defined(GL_SPECULAR) |
| 4435 | #if defined(GL_EMISSION) |
| 4436 | case GL_EMISSION: |
| 4437 | #endif // defined(GL_EMISSION) |
| 4438 | _needed = 4; |
| 4439 | break; |
| 4440 | default: |
| 4441 | _needed = 0; |
| 4442 | break; |
| 4443 | } |
| 4444 | if (_remaining < _needed) { |
| 4445 | _exception = 1; |
| 4446 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 4447 | goto exit; |
| 4448 | } |
| 4449 | glGetLightfv( |
| 4450 | (GLenum)light, |
| 4451 | (GLenum)pname, |
| 4452 | (GLfloat *)params |
| 4453 | ); |
| 4454 | |
| 4455 | exit: |
| 4456 | if (_array) { |
| 4457 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 4458 | } |
| 4459 | } |
| 4460 | |
| 4461 | /* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */ |
| 4462 | static void |
| 4463 | android_glGetLightxv__II_3II |
| 4464 | (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) { |
| 4465 | jint _exception = 0; |
| 4466 | GLfixed *params_base = (GLfixed *) 0; |
| 4467 | jint _remaining; |
| 4468 | GLfixed *params = (GLfixed *) 0; |
| 4469 | |
| 4470 | if (!params_ref) { |
| 4471 | _exception = 1; |
| 4472 | _env->ThrowNew(IAEClass, "params == null"); |
| 4473 | goto exit; |
| 4474 | } |
| 4475 | if (offset < 0) { |
| 4476 | _exception = 1; |
| 4477 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4478 | goto exit; |
| 4479 | } |
| 4480 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 4481 | int _needed; |
| 4482 | switch (pname) { |
| 4483 | #if defined(GL_SPOT_EXPONENT) |
| 4484 | case GL_SPOT_EXPONENT: |
| 4485 | #endif // defined(GL_SPOT_EXPONENT) |
| 4486 | #if defined(GL_SPOT_CUTOFF) |
| 4487 | case GL_SPOT_CUTOFF: |
| 4488 | #endif // defined(GL_SPOT_CUTOFF) |
| 4489 | #if defined(GL_CONSTANT_ATTENUATION) |
| 4490 | case GL_CONSTANT_ATTENUATION: |
| 4491 | #endif // defined(GL_CONSTANT_ATTENUATION) |
| 4492 | #if defined(GL_LINEAR_ATTENUATION) |
| 4493 | case GL_LINEAR_ATTENUATION: |
| 4494 | #endif // defined(GL_LINEAR_ATTENUATION) |
| 4495 | #if defined(GL_QUADRATIC_ATTENUATION) |
| 4496 | case GL_QUADRATIC_ATTENUATION: |
| 4497 | #endif // defined(GL_QUADRATIC_ATTENUATION) |
| 4498 | _needed = 1; |
| 4499 | break; |
| 4500 | #if defined(GL_SPOT_DIRECTION) |
| 4501 | case GL_SPOT_DIRECTION: |
| 4502 | #endif // defined(GL_SPOT_DIRECTION) |
| 4503 | _needed = 3; |
| 4504 | break; |
| 4505 | #if defined(GL_AMBIENT) |
| 4506 | case GL_AMBIENT: |
| 4507 | #endif // defined(GL_AMBIENT) |
| 4508 | #if defined(GL_DIFFUSE) |
| 4509 | case GL_DIFFUSE: |
| 4510 | #endif // defined(GL_DIFFUSE) |
| 4511 | #if defined(GL_SPECULAR) |
| 4512 | case GL_SPECULAR: |
| 4513 | #endif // defined(GL_SPECULAR) |
| 4514 | #if defined(GL_EMISSION) |
| 4515 | case GL_EMISSION: |
| 4516 | #endif // defined(GL_EMISSION) |
| 4517 | _needed = 4; |
| 4518 | break; |
| 4519 | default: |
| 4520 | _needed = 0; |
| 4521 | break; |
| 4522 | } |
| 4523 | if (_remaining < _needed) { |
| 4524 | _exception = 1; |
| 4525 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 4526 | goto exit; |
| 4527 | } |
| 4528 | params_base = (GLfixed *) |
| 4529 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 4530 | params = params_base + offset; |
| 4531 | |
| 4532 | glGetLightxv( |
| 4533 | (GLenum)light, |
| 4534 | (GLenum)pname, |
| 4535 | (GLfixed *)params |
| 4536 | ); |
| 4537 | |
| 4538 | exit: |
| 4539 | if (params_base) { |
| 4540 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 4541 | _exception ? JNI_ABORT: 0); |
| 4542 | } |
| 4543 | } |
| 4544 | |
| 4545 | /* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */ |
| 4546 | static void |
| 4547 | android_glGetLightxv__IILjava_nio_IntBuffer_2 |
| 4548 | (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { |
| 4549 | jint _exception = 0; |
| 4550 | jarray _array = (jarray) 0; |
| 4551 | jint _remaining; |
| 4552 | GLfixed *params = (GLfixed *) 0; |
| 4553 | |
| 4554 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 4555 | int _needed; |
| 4556 | switch (pname) { |
| 4557 | #if defined(GL_SPOT_EXPONENT) |
| 4558 | case GL_SPOT_EXPONENT: |
| 4559 | #endif // defined(GL_SPOT_EXPONENT) |
| 4560 | #if defined(GL_SPOT_CUTOFF) |
| 4561 | case GL_SPOT_CUTOFF: |
| 4562 | #endif // defined(GL_SPOT_CUTOFF) |
| 4563 | #if defined(GL_CONSTANT_ATTENUATION) |
| 4564 | case GL_CONSTANT_ATTENUATION: |
| 4565 | #endif // defined(GL_CONSTANT_ATTENUATION) |
| 4566 | #if defined(GL_LINEAR_ATTENUATION) |
| 4567 | case GL_LINEAR_ATTENUATION: |
| 4568 | #endif // defined(GL_LINEAR_ATTENUATION) |
| 4569 | #if defined(GL_QUADRATIC_ATTENUATION) |
| 4570 | case GL_QUADRATIC_ATTENUATION: |
| 4571 | #endif // defined(GL_QUADRATIC_ATTENUATION) |
| 4572 | _needed = 1; |
| 4573 | break; |
| 4574 | #if defined(GL_SPOT_DIRECTION) |
| 4575 | case GL_SPOT_DIRECTION: |
| 4576 | #endif // defined(GL_SPOT_DIRECTION) |
| 4577 | _needed = 3; |
| 4578 | break; |
| 4579 | #if defined(GL_AMBIENT) |
| 4580 | case GL_AMBIENT: |
| 4581 | #endif // defined(GL_AMBIENT) |
| 4582 | #if defined(GL_DIFFUSE) |
| 4583 | case GL_DIFFUSE: |
| 4584 | #endif // defined(GL_DIFFUSE) |
| 4585 | #if defined(GL_SPECULAR) |
| 4586 | case GL_SPECULAR: |
| 4587 | #endif // defined(GL_SPECULAR) |
| 4588 | #if defined(GL_EMISSION) |
| 4589 | case GL_EMISSION: |
| 4590 | #endif // defined(GL_EMISSION) |
| 4591 | _needed = 4; |
| 4592 | break; |
| 4593 | default: |
| 4594 | _needed = 0; |
| 4595 | break; |
| 4596 | } |
| 4597 | if (_remaining < _needed) { |
| 4598 | _exception = 1; |
| 4599 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 4600 | goto exit; |
| 4601 | } |
| 4602 | glGetLightxv( |
| 4603 | (GLenum)light, |
| 4604 | (GLenum)pname, |
| 4605 | (GLfixed *)params |
| 4606 | ); |
| 4607 | |
| 4608 | exit: |
| 4609 | if (_array) { |
| 4610 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 4611 | } |
| 4612 | } |
| 4613 | |
| 4614 | /* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */ |
| 4615 | static void |
| 4616 | android_glGetMaterialfv__II_3FI |
| 4617 | (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) { |
| 4618 | jint _exception = 0; |
| 4619 | GLfloat *params_base = (GLfloat *) 0; |
| 4620 | jint _remaining; |
| 4621 | GLfloat *params = (GLfloat *) 0; |
| 4622 | |
| 4623 | if (!params_ref) { |
| 4624 | _exception = 1; |
| 4625 | _env->ThrowNew(IAEClass, "params == null"); |
| 4626 | goto exit; |
| 4627 | } |
| 4628 | if (offset < 0) { |
| 4629 | _exception = 1; |
| 4630 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4631 | goto exit; |
| 4632 | } |
| 4633 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 4634 | int _needed; |
| 4635 | switch (pname) { |
| 4636 | #if defined(GL_SHININESS) |
| 4637 | case GL_SHININESS: |
| 4638 | #endif // defined(GL_SHININESS) |
| 4639 | _needed = 1; |
| 4640 | break; |
| 4641 | #if defined(GL_AMBIENT) |
| 4642 | case GL_AMBIENT: |
| 4643 | #endif // defined(GL_AMBIENT) |
| 4644 | #if defined(GL_DIFFUSE) |
| 4645 | case GL_DIFFUSE: |
| 4646 | #endif // defined(GL_DIFFUSE) |
| 4647 | #if defined(GL_SPECULAR) |
| 4648 | case GL_SPECULAR: |
| 4649 | #endif // defined(GL_SPECULAR) |
| 4650 | #if defined(GL_EMISSION) |
| 4651 | case GL_EMISSION: |
| 4652 | #endif // defined(GL_EMISSION) |
| 4653 | #if defined(GL_AMBIENT_AND_DIFFUSE) |
| 4654 | case GL_AMBIENT_AND_DIFFUSE: |
| 4655 | #endif // defined(GL_AMBIENT_AND_DIFFUSE) |
| 4656 | _needed = 4; |
| 4657 | break; |
| 4658 | default: |
| 4659 | _needed = 0; |
| 4660 | break; |
| 4661 | } |
| 4662 | if (_remaining < _needed) { |
| 4663 | _exception = 1; |
| 4664 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 4665 | goto exit; |
| 4666 | } |
| 4667 | params_base = (GLfloat *) |
| 4668 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 4669 | params = params_base + offset; |
| 4670 | |
| 4671 | glGetMaterialfv( |
| 4672 | (GLenum)face, |
| 4673 | (GLenum)pname, |
| 4674 | (GLfloat *)params |
| 4675 | ); |
| 4676 | |
| 4677 | exit: |
| 4678 | if (params_base) { |
| 4679 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 4680 | _exception ? JNI_ABORT: 0); |
| 4681 | } |
| 4682 | } |
| 4683 | |
| 4684 | /* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */ |
| 4685 | static void |
| 4686 | android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 |
| 4687 | (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { |
| 4688 | jint _exception = 0; |
| 4689 | jarray _array = (jarray) 0; |
| 4690 | jint _remaining; |
| 4691 | GLfloat *params = (GLfloat *) 0; |
| 4692 | |
| 4693 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 4694 | int _needed; |
| 4695 | switch (pname) { |
| 4696 | #if defined(GL_SHININESS) |
| 4697 | case GL_SHININESS: |
| 4698 | #endif // defined(GL_SHININESS) |
| 4699 | _needed = 1; |
| 4700 | break; |
| 4701 | #if defined(GL_AMBIENT) |
| 4702 | case GL_AMBIENT: |
| 4703 | #endif // defined(GL_AMBIENT) |
| 4704 | #if defined(GL_DIFFUSE) |
| 4705 | case GL_DIFFUSE: |
| 4706 | #endif // defined(GL_DIFFUSE) |
| 4707 | #if defined(GL_SPECULAR) |
| 4708 | case GL_SPECULAR: |
| 4709 | #endif // defined(GL_SPECULAR) |
| 4710 | #if defined(GL_EMISSION) |
| 4711 | case GL_EMISSION: |
| 4712 | #endif // defined(GL_EMISSION) |
| 4713 | #if defined(GL_AMBIENT_AND_DIFFUSE) |
| 4714 | case GL_AMBIENT_AND_DIFFUSE: |
| 4715 | #endif // defined(GL_AMBIENT_AND_DIFFUSE) |
| 4716 | _needed = 4; |
| 4717 | break; |
| 4718 | default: |
| 4719 | _needed = 0; |
| 4720 | break; |
| 4721 | } |
| 4722 | if (_remaining < _needed) { |
| 4723 | _exception = 1; |
| 4724 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 4725 | goto exit; |
| 4726 | } |
| 4727 | glGetMaterialfv( |
| 4728 | (GLenum)face, |
| 4729 | (GLenum)pname, |
| 4730 | (GLfloat *)params |
| 4731 | ); |
| 4732 | |
| 4733 | exit: |
| 4734 | if (_array) { |
| 4735 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 4736 | } |
| 4737 | } |
| 4738 | |
| 4739 | /* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */ |
| 4740 | static void |
| 4741 | android_glGetMaterialxv__II_3II |
| 4742 | (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) { |
| 4743 | jint _exception = 0; |
| 4744 | GLfixed *params_base = (GLfixed *) 0; |
| 4745 | jint _remaining; |
| 4746 | GLfixed *params = (GLfixed *) 0; |
| 4747 | |
| 4748 | if (!params_ref) { |
| 4749 | _exception = 1; |
| 4750 | _env->ThrowNew(IAEClass, "params == null"); |
| 4751 | goto exit; |
| 4752 | } |
| 4753 | if (offset < 0) { |
| 4754 | _exception = 1; |
| 4755 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4756 | goto exit; |
| 4757 | } |
| 4758 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 4759 | int _needed; |
| 4760 | switch (pname) { |
| 4761 | #if defined(GL_SHININESS) |
| 4762 | case GL_SHININESS: |
| 4763 | #endif // defined(GL_SHININESS) |
| 4764 | _needed = 1; |
| 4765 | break; |
| 4766 | #if defined(GL_AMBIENT) |
| 4767 | case GL_AMBIENT: |
| 4768 | #endif // defined(GL_AMBIENT) |
| 4769 | #if defined(GL_DIFFUSE) |
| 4770 | case GL_DIFFUSE: |
| 4771 | #endif // defined(GL_DIFFUSE) |
| 4772 | #if defined(GL_SPECULAR) |
| 4773 | case GL_SPECULAR: |
| 4774 | #endif // defined(GL_SPECULAR) |
| 4775 | #if defined(GL_EMISSION) |
| 4776 | case GL_EMISSION: |
| 4777 | #endif // defined(GL_EMISSION) |
| 4778 | #if defined(GL_AMBIENT_AND_DIFFUSE) |
| 4779 | case GL_AMBIENT_AND_DIFFUSE: |
| 4780 | #endif // defined(GL_AMBIENT_AND_DIFFUSE) |
| 4781 | _needed = 4; |
| 4782 | break; |
| 4783 | default: |
| 4784 | _needed = 0; |
| 4785 | break; |
| 4786 | } |
| 4787 | if (_remaining < _needed) { |
| 4788 | _exception = 1; |
| 4789 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 4790 | goto exit; |
| 4791 | } |
| 4792 | params_base = (GLfixed *) |
| 4793 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 4794 | params = params_base + offset; |
| 4795 | |
| 4796 | glGetMaterialxv( |
| 4797 | (GLenum)face, |
| 4798 | (GLenum)pname, |
| 4799 | (GLfixed *)params |
| 4800 | ); |
| 4801 | |
| 4802 | exit: |
| 4803 | if (params_base) { |
| 4804 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 4805 | _exception ? JNI_ABORT: 0); |
| 4806 | } |
| 4807 | } |
| 4808 | |
| 4809 | /* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */ |
| 4810 | static void |
| 4811 | android_glGetMaterialxv__IILjava_nio_IntBuffer_2 |
| 4812 | (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { |
| 4813 | jint _exception = 0; |
| 4814 | jarray _array = (jarray) 0; |
| 4815 | jint _remaining; |
| 4816 | GLfixed *params = (GLfixed *) 0; |
| 4817 | |
| 4818 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 4819 | int _needed; |
| 4820 | switch (pname) { |
| 4821 | #if defined(GL_SHININESS) |
| 4822 | case GL_SHININESS: |
| 4823 | #endif // defined(GL_SHININESS) |
| 4824 | _needed = 1; |
| 4825 | break; |
| 4826 | #if defined(GL_AMBIENT) |
| 4827 | case GL_AMBIENT: |
| 4828 | #endif // defined(GL_AMBIENT) |
| 4829 | #if defined(GL_DIFFUSE) |
| 4830 | case GL_DIFFUSE: |
| 4831 | #endif // defined(GL_DIFFUSE) |
| 4832 | #if defined(GL_SPECULAR) |
| 4833 | case GL_SPECULAR: |
| 4834 | #endif // defined(GL_SPECULAR) |
| 4835 | #if defined(GL_EMISSION) |
| 4836 | case GL_EMISSION: |
| 4837 | #endif // defined(GL_EMISSION) |
| 4838 | #if defined(GL_AMBIENT_AND_DIFFUSE) |
| 4839 | case GL_AMBIENT_AND_DIFFUSE: |
| 4840 | #endif // defined(GL_AMBIENT_AND_DIFFUSE) |
| 4841 | _needed = 4; |
| 4842 | break; |
| 4843 | default: |
| 4844 | _needed = 0; |
| 4845 | break; |
| 4846 | } |
| 4847 | if (_remaining < _needed) { |
| 4848 | _exception = 1; |
| 4849 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 4850 | goto exit; |
| 4851 | } |
| 4852 | glGetMaterialxv( |
| 4853 | (GLenum)face, |
| 4854 | (GLenum)pname, |
| 4855 | (GLfixed *)params |
| 4856 | ); |
| 4857 | |
| 4858 | exit: |
| 4859 | if (_array) { |
| 4860 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 4861 | } |
| 4862 | } |
| 4863 | |
| 4864 | /* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */ |
| 4865 | static void |
| 4866 | android_glGetTexEnviv__II_3II |
| 4867 | (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) { |
| 4868 | jint _exception = 0; |
| 4869 | GLint *params_base = (GLint *) 0; |
| 4870 | jint _remaining; |
| 4871 | GLint *params = (GLint *) 0; |
| 4872 | |
| 4873 | if (!params_ref) { |
| 4874 | _exception = 1; |
| 4875 | _env->ThrowNew(IAEClass, "params == null"); |
| 4876 | goto exit; |
| 4877 | } |
| 4878 | if (offset < 0) { |
| 4879 | _exception = 1; |
| 4880 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4881 | goto exit; |
| 4882 | } |
| 4883 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 4884 | int _needed; |
| 4885 | switch (pname) { |
| 4886 | #if defined(GL_TEXTURE_ENV_MODE) |
| 4887 | case GL_TEXTURE_ENV_MODE: |
| 4888 | #endif // defined(GL_TEXTURE_ENV_MODE) |
| 4889 | #if defined(GL_COMBINE_RGB) |
| 4890 | case GL_COMBINE_RGB: |
| 4891 | #endif // defined(GL_COMBINE_RGB) |
| 4892 | #if defined(GL_COMBINE_ALPHA) |
| 4893 | case GL_COMBINE_ALPHA: |
| 4894 | #endif // defined(GL_COMBINE_ALPHA) |
| 4895 | _needed = 1; |
| 4896 | break; |
| 4897 | #if defined(GL_TEXTURE_ENV_COLOR) |
| 4898 | case GL_TEXTURE_ENV_COLOR: |
| 4899 | #endif // defined(GL_TEXTURE_ENV_COLOR) |
| 4900 | _needed = 4; |
| 4901 | break; |
| 4902 | default: |
| 4903 | _needed = 0; |
| 4904 | break; |
| 4905 | } |
| 4906 | if (_remaining < _needed) { |
| 4907 | _exception = 1; |
| 4908 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 4909 | goto exit; |
| 4910 | } |
| 4911 | params_base = (GLint *) |
| 4912 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 4913 | params = params_base + offset; |
| 4914 | |
| 4915 | glGetTexEnviv( |
| 4916 | (GLenum)env, |
| 4917 | (GLenum)pname, |
| 4918 | (GLint *)params |
| 4919 | ); |
| 4920 | |
| 4921 | exit: |
| 4922 | if (params_base) { |
| 4923 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 4924 | _exception ? JNI_ABORT: 0); |
| 4925 | } |
| 4926 | } |
| 4927 | |
| 4928 | /* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */ |
| 4929 | static void |
| 4930 | android_glGetTexEnviv__IILjava_nio_IntBuffer_2 |
| 4931 | (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) { |
| 4932 | jint _exception = 0; |
| 4933 | jarray _array = (jarray) 0; |
| 4934 | jint _remaining; |
| 4935 | GLint *params = (GLint *) 0; |
| 4936 | |
| 4937 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 4938 | int _needed; |
| 4939 | switch (pname) { |
| 4940 | #if defined(GL_TEXTURE_ENV_MODE) |
| 4941 | case GL_TEXTURE_ENV_MODE: |
| 4942 | #endif // defined(GL_TEXTURE_ENV_MODE) |
| 4943 | #if defined(GL_COMBINE_RGB) |
| 4944 | case GL_COMBINE_RGB: |
| 4945 | #endif // defined(GL_COMBINE_RGB) |
| 4946 | #if defined(GL_COMBINE_ALPHA) |
| 4947 | case GL_COMBINE_ALPHA: |
| 4948 | #endif // defined(GL_COMBINE_ALPHA) |
| 4949 | _needed = 1; |
| 4950 | break; |
| 4951 | #if defined(GL_TEXTURE_ENV_COLOR) |
| 4952 | case GL_TEXTURE_ENV_COLOR: |
| 4953 | #endif // defined(GL_TEXTURE_ENV_COLOR) |
| 4954 | _needed = 4; |
| 4955 | break; |
| 4956 | default: |
| 4957 | _needed = 0; |
| 4958 | break; |
| 4959 | } |
| 4960 | if (_remaining < _needed) { |
| 4961 | _exception = 1; |
| 4962 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 4963 | goto exit; |
| 4964 | } |
| 4965 | glGetTexEnviv( |
| 4966 | (GLenum)env, |
| 4967 | (GLenum)pname, |
| 4968 | (GLint *)params |
| 4969 | ); |
| 4970 | |
| 4971 | exit: |
| 4972 | if (_array) { |
| 4973 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 4974 | } |
| 4975 | } |
| 4976 | |
| 4977 | /* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */ |
| 4978 | static void |
| 4979 | android_glGetTexEnvxv__II_3II |
| 4980 | (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) { |
| 4981 | jint _exception = 0; |
| 4982 | GLfixed *params_base = (GLfixed *) 0; |
| 4983 | jint _remaining; |
| 4984 | GLfixed *params = (GLfixed *) 0; |
| 4985 | |
| 4986 | if (!params_ref) { |
| 4987 | _exception = 1; |
| 4988 | _env->ThrowNew(IAEClass, "params == null"); |
| 4989 | goto exit; |
| 4990 | } |
| 4991 | if (offset < 0) { |
| 4992 | _exception = 1; |
| 4993 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 4994 | goto exit; |
| 4995 | } |
| 4996 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 4997 | int _needed; |
| 4998 | switch (pname) { |
| 4999 | #if defined(GL_TEXTURE_ENV_MODE) |
| 5000 | case GL_TEXTURE_ENV_MODE: |
| 5001 | #endif // defined(GL_TEXTURE_ENV_MODE) |
| 5002 | #if defined(GL_COMBINE_RGB) |
| 5003 | case GL_COMBINE_RGB: |
| 5004 | #endif // defined(GL_COMBINE_RGB) |
| 5005 | #if defined(GL_COMBINE_ALPHA) |
| 5006 | case GL_COMBINE_ALPHA: |
| 5007 | #endif // defined(GL_COMBINE_ALPHA) |
| 5008 | _needed = 1; |
| 5009 | break; |
| 5010 | #if defined(GL_TEXTURE_ENV_COLOR) |
| 5011 | case GL_TEXTURE_ENV_COLOR: |
| 5012 | #endif // defined(GL_TEXTURE_ENV_COLOR) |
| 5013 | _needed = 4; |
| 5014 | break; |
| 5015 | default: |
| 5016 | _needed = 0; |
| 5017 | break; |
| 5018 | } |
| 5019 | if (_remaining < _needed) { |
| 5020 | _exception = 1; |
| 5021 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 5022 | goto exit; |
| 5023 | } |
| 5024 | params_base = (GLfixed *) |
| 5025 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 5026 | params = params_base + offset; |
| 5027 | |
| 5028 | glGetTexEnvxv( |
| 5029 | (GLenum)env, |
| 5030 | (GLenum)pname, |
| 5031 | (GLfixed *)params |
| 5032 | ); |
| 5033 | |
| 5034 | exit: |
| 5035 | if (params_base) { |
| 5036 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 5037 | _exception ? JNI_ABORT: 0); |
| 5038 | } |
| 5039 | } |
| 5040 | |
| 5041 | /* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */ |
| 5042 | static void |
| 5043 | android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 |
| 5044 | (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) { |
| 5045 | jint _exception = 0; |
| 5046 | jarray _array = (jarray) 0; |
| 5047 | jint _remaining; |
| 5048 | GLfixed *params = (GLfixed *) 0; |
| 5049 | |
| 5050 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 5051 | int _needed; |
| 5052 | switch (pname) { |
| 5053 | #if defined(GL_TEXTURE_ENV_MODE) |
| 5054 | case GL_TEXTURE_ENV_MODE: |
| 5055 | #endif // defined(GL_TEXTURE_ENV_MODE) |
| 5056 | #if defined(GL_COMBINE_RGB) |
| 5057 | case GL_COMBINE_RGB: |
| 5058 | #endif // defined(GL_COMBINE_RGB) |
| 5059 | #if defined(GL_COMBINE_ALPHA) |
| 5060 | case GL_COMBINE_ALPHA: |
| 5061 | #endif // defined(GL_COMBINE_ALPHA) |
| 5062 | _needed = 1; |
| 5063 | break; |
| 5064 | #if defined(GL_TEXTURE_ENV_COLOR) |
| 5065 | case GL_TEXTURE_ENV_COLOR: |
| 5066 | #endif // defined(GL_TEXTURE_ENV_COLOR) |
| 5067 | _needed = 4; |
| 5068 | break; |
| 5069 | default: |
| 5070 | _needed = 0; |
| 5071 | break; |
| 5072 | } |
| 5073 | if (_remaining < _needed) { |
| 5074 | _exception = 1; |
| 5075 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 5076 | goto exit; |
| 5077 | } |
| 5078 | glGetTexEnvxv( |
| 5079 | (GLenum)env, |
| 5080 | (GLenum)pname, |
| 5081 | (GLfixed *)params |
| 5082 | ); |
| 5083 | |
| 5084 | exit: |
| 5085 | if (_array) { |
| 5086 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 5087 | } |
| 5088 | } |
| 5089 | |
| 5090 | /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */ |
| 5091 | static void |
| 5092 | android_glGetTexParameterfv__II_3FI |
| 5093 | (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { |
| 5094 | jint _exception = 0; |
| 5095 | GLfloat *params_base = (GLfloat *) 0; |
| 5096 | jint _remaining; |
| 5097 | GLfloat *params = (GLfloat *) 0; |
| 5098 | |
| 5099 | if (!params_ref) { |
| 5100 | _exception = 1; |
| 5101 | _env->ThrowNew(IAEClass, "params == null"); |
| 5102 | goto exit; |
| 5103 | } |
| 5104 | if (offset < 0) { |
| 5105 | _exception = 1; |
| 5106 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5107 | goto exit; |
| 5108 | } |
| 5109 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 5110 | if (_remaining < 1) { |
| 5111 | _exception = 1; |
| 5112 | _env->ThrowNew(IAEClass, "length - offset < 1"); |
| 5113 | goto exit; |
| 5114 | } |
| 5115 | params_base = (GLfloat *) |
| 5116 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 5117 | params = params_base + offset; |
| 5118 | |
| 5119 | glGetTexParameterfv( |
| 5120 | (GLenum)target, |
| 5121 | (GLenum)pname, |
| 5122 | (GLfloat *)params |
| 5123 | ); |
| 5124 | |
| 5125 | exit: |
| 5126 | if (params_base) { |
| 5127 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 5128 | _exception ? JNI_ABORT: 0); |
| 5129 | } |
| 5130 | } |
| 5131 | |
| 5132 | /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */ |
| 5133 | static void |
| 5134 | android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 |
| 5135 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
| 5136 | jint _exception = 0; |
| 5137 | jarray _array = (jarray) 0; |
| 5138 | jint _remaining; |
| 5139 | GLfloat *params = (GLfloat *) 0; |
| 5140 | |
| 5141 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 5142 | if (_remaining < 1) { |
| 5143 | _exception = 1; |
| 5144 | _env->ThrowNew(IAEClass, "remaining() < 1"); |
| 5145 | goto exit; |
| 5146 | } |
| 5147 | glGetTexParameterfv( |
| 5148 | (GLenum)target, |
| 5149 | (GLenum)pname, |
| 5150 | (GLfloat *)params |
| 5151 | ); |
| 5152 | |
| 5153 | exit: |
| 5154 | if (_array) { |
| 5155 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 5156 | } |
| 5157 | } |
| 5158 | |
| 5159 | /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */ |
| 5160 | static void |
| 5161 | android_glGetTexParameteriv__II_3II |
| 5162 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 5163 | jint _exception = 0; |
| 5164 | GLint *params_base = (GLint *) 0; |
| 5165 | jint _remaining; |
| 5166 | GLint *params = (GLint *) 0; |
| 5167 | |
| 5168 | if (!params_ref) { |
| 5169 | _exception = 1; |
| 5170 | _env->ThrowNew(IAEClass, "params == null"); |
| 5171 | goto exit; |
| 5172 | } |
| 5173 | if (offset < 0) { |
| 5174 | _exception = 1; |
| 5175 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5176 | goto exit; |
| 5177 | } |
| 5178 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 5179 | if (_remaining < 1) { |
| 5180 | _exception = 1; |
| 5181 | _env->ThrowNew(IAEClass, "length - offset < 1"); |
| 5182 | goto exit; |
| 5183 | } |
| 5184 | params_base = (GLint *) |
| 5185 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 5186 | params = params_base + offset; |
| 5187 | |
| 5188 | glGetTexParameteriv( |
| 5189 | (GLenum)target, |
| 5190 | (GLenum)pname, |
| 5191 | (GLint *)params |
| 5192 | ); |
| 5193 | |
| 5194 | exit: |
| 5195 | if (params_base) { |
| 5196 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 5197 | _exception ? JNI_ABORT: 0); |
| 5198 | } |
| 5199 | } |
| 5200 | |
| 5201 | /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */ |
| 5202 | static void |
| 5203 | android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 |
| 5204 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
| 5205 | jint _exception = 0; |
| 5206 | jarray _array = (jarray) 0; |
| 5207 | jint _remaining; |
| 5208 | GLint *params = (GLint *) 0; |
| 5209 | |
| 5210 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 5211 | if (_remaining < 1) { |
| 5212 | _exception = 1; |
| 5213 | _env->ThrowNew(IAEClass, "remaining() < 1"); |
| 5214 | goto exit; |
| 5215 | } |
| 5216 | glGetTexParameteriv( |
| 5217 | (GLenum)target, |
| 5218 | (GLenum)pname, |
| 5219 | (GLint *)params |
| 5220 | ); |
| 5221 | |
| 5222 | exit: |
| 5223 | if (_array) { |
| 5224 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 5225 | } |
| 5226 | } |
| 5227 | |
| 5228 | /* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */ |
| 5229 | static void |
| 5230 | android_glGetTexParameterxv__II_3II |
| 5231 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 5232 | jint _exception = 0; |
| 5233 | GLfixed *params_base = (GLfixed *) 0; |
| 5234 | jint _remaining; |
| 5235 | GLfixed *params = (GLfixed *) 0; |
| 5236 | |
| 5237 | if (!params_ref) { |
| 5238 | _exception = 1; |
| 5239 | _env->ThrowNew(IAEClass, "params == null"); |
| 5240 | goto exit; |
| 5241 | } |
| 5242 | if (offset < 0) { |
| 5243 | _exception = 1; |
| 5244 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5245 | goto exit; |
| 5246 | } |
| 5247 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 5248 | if (_remaining < 1) { |
| 5249 | _exception = 1; |
| 5250 | _env->ThrowNew(IAEClass, "length - offset < 1"); |
| 5251 | goto exit; |
| 5252 | } |
| 5253 | params_base = (GLfixed *) |
| 5254 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 5255 | params = params_base + offset; |
| 5256 | |
| 5257 | glGetTexParameterxv( |
| 5258 | (GLenum)target, |
| 5259 | (GLenum)pname, |
| 5260 | (GLfixed *)params |
| 5261 | ); |
| 5262 | |
| 5263 | exit: |
| 5264 | if (params_base) { |
| 5265 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 5266 | _exception ? JNI_ABORT: 0); |
| 5267 | } |
| 5268 | } |
| 5269 | |
| 5270 | /* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */ |
| 5271 | static void |
| 5272 | android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 |
| 5273 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
| 5274 | jint _exception = 0; |
| 5275 | jarray _array = (jarray) 0; |
| 5276 | jint _remaining; |
| 5277 | GLfixed *params = (GLfixed *) 0; |
| 5278 | |
| 5279 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 5280 | if (_remaining < 1) { |
| 5281 | _exception = 1; |
| 5282 | _env->ThrowNew(IAEClass, "remaining() < 1"); |
| 5283 | goto exit; |
| 5284 | } |
| 5285 | glGetTexParameterxv( |
| 5286 | (GLenum)target, |
| 5287 | (GLenum)pname, |
| 5288 | (GLfixed *)params |
| 5289 | ); |
| 5290 | |
| 5291 | exit: |
| 5292 | if (_array) { |
| 5293 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 5294 | } |
| 5295 | } |
| 5296 | |
| 5297 | /* GLboolean glIsBuffer ( GLuint buffer ) */ |
| 5298 | static jboolean |
| 5299 | android_glIsBuffer__I |
| 5300 | (JNIEnv *_env, jobject _this, jint buffer) { |
| 5301 | GLboolean _returnValue; |
| 5302 | _returnValue = glIsBuffer( |
| 5303 | (GLuint)buffer |
| 5304 | ); |
| 5305 | return _returnValue; |
| 5306 | } |
| 5307 | |
| 5308 | /* GLboolean glIsEnabled ( GLenum cap ) */ |
| 5309 | static jboolean |
| 5310 | android_glIsEnabled__I |
| 5311 | (JNIEnv *_env, jobject _this, jint cap) { |
| 5312 | GLboolean _returnValue; |
| 5313 | _returnValue = glIsEnabled( |
| 5314 | (GLenum)cap |
| 5315 | ); |
| 5316 | return _returnValue; |
| 5317 | } |
| 5318 | |
| 5319 | /* GLboolean glIsTexture ( GLuint texture ) */ |
| 5320 | static jboolean |
| 5321 | android_glIsTexture__I |
| 5322 | (JNIEnv *_env, jobject _this, jint texture) { |
| 5323 | GLboolean _returnValue; |
| 5324 | _returnValue = glIsTexture( |
| 5325 | (GLuint)texture |
| 5326 | ); |
| 5327 | return _returnValue; |
| 5328 | } |
| 5329 | |
| 5330 | /* void glNormalPointer ( GLenum type, GLsizei stride, GLint offset ) */ |
| 5331 | static void |
| 5332 | android_glNormalPointer__III |
| 5333 | (JNIEnv *_env, jobject _this, jint type, jint stride, jint offset) { |
| 5334 | glNormalPointer( |
| 5335 | (GLenum)type, |
| 5336 | (GLsizei)stride, |
| 5337 | (const GLvoid *)offset |
| 5338 | ); |
| 5339 | } |
| 5340 | |
| 5341 | /* void glPointParameterf ( GLenum pname, GLfloat param ) */ |
| 5342 | static void |
| 5343 | android_glPointParameterf__IF |
| 5344 | (JNIEnv *_env, jobject _this, jint pname, jfloat param) { |
| 5345 | glPointParameterf( |
| 5346 | (GLenum)pname, |
| 5347 | (GLfloat)param |
| 5348 | ); |
| 5349 | } |
| 5350 | |
| 5351 | /* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */ |
| 5352 | static void |
| 5353 | android_glPointParameterfv__I_3FI |
| 5354 | (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { |
| 5355 | GLfloat *params_base = (GLfloat *) 0; |
| 5356 | jint _remaining; |
| 5357 | GLfloat *params = (GLfloat *) 0; |
| 5358 | |
| 5359 | if (!params_ref) { |
| 5360 | _env->ThrowNew(IAEClass, "params == null"); |
| 5361 | goto exit; |
| 5362 | } |
| 5363 | if (offset < 0) { |
| 5364 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5365 | goto exit; |
| 5366 | } |
| 5367 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 5368 | if (_remaining < 1) { |
| 5369 | _env->ThrowNew(IAEClass, "length - offset < 1"); |
| 5370 | goto exit; |
| 5371 | } |
| 5372 | params_base = (GLfloat *) |
| 5373 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 5374 | params = params_base + offset; |
| 5375 | |
| 5376 | glPointParameterfv( |
| 5377 | (GLenum)pname, |
| 5378 | (GLfloat *)params |
| 5379 | ); |
| 5380 | |
| 5381 | exit: |
| 5382 | if (params_base) { |
| 5383 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 5384 | JNI_ABORT); |
| 5385 | } |
| 5386 | } |
| 5387 | |
| 5388 | /* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */ |
| 5389 | static void |
| 5390 | android_glPointParameterfv__ILjava_nio_FloatBuffer_2 |
| 5391 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 5392 | jarray _array = (jarray) 0; |
| 5393 | jint _remaining; |
| 5394 | GLfloat *params = (GLfloat *) 0; |
| 5395 | |
| 5396 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 5397 | if (_remaining < 1) { |
| 5398 | _env->ThrowNew(IAEClass, "remaining() < 1"); |
| 5399 | goto exit; |
| 5400 | } |
| 5401 | glPointParameterfv( |
| 5402 | (GLenum)pname, |
| 5403 | (GLfloat *)params |
| 5404 | ); |
| 5405 | |
| 5406 | exit: |
| 5407 | if (_array) { |
| 5408 | releasePointer(_env, _array, params, JNI_FALSE); |
| 5409 | } |
| 5410 | } |
| 5411 | |
| 5412 | /* void glPointParameterx ( GLenum pname, GLfixed param ) */ |
| 5413 | static void |
| 5414 | android_glPointParameterx__II |
| 5415 | (JNIEnv *_env, jobject _this, jint pname, jint param) { |
| 5416 | glPointParameterx( |
| 5417 | (GLenum)pname, |
| 5418 | (GLfixed)param |
| 5419 | ); |
| 5420 | } |
| 5421 | |
| 5422 | /* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */ |
| 5423 | static void |
| 5424 | android_glPointParameterxv__I_3II |
| 5425 | (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { |
| 5426 | GLfixed *params_base = (GLfixed *) 0; |
| 5427 | jint _remaining; |
| 5428 | GLfixed *params = (GLfixed *) 0; |
| 5429 | |
| 5430 | if (!params_ref) { |
| 5431 | _env->ThrowNew(IAEClass, "params == null"); |
| 5432 | goto exit; |
| 5433 | } |
| 5434 | if (offset < 0) { |
| 5435 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5436 | goto exit; |
| 5437 | } |
| 5438 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 5439 | if (_remaining < 1) { |
| 5440 | _env->ThrowNew(IAEClass, "length - offset < 1"); |
| 5441 | goto exit; |
| 5442 | } |
| 5443 | params_base = (GLfixed *) |
| 5444 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 5445 | params = params_base + offset; |
| 5446 | |
| 5447 | glPointParameterxv( |
| 5448 | (GLenum)pname, |
| 5449 | (GLfixed *)params |
| 5450 | ); |
| 5451 | |
| 5452 | exit: |
| 5453 | if (params_base) { |
| 5454 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 5455 | JNI_ABORT); |
| 5456 | } |
| 5457 | } |
| 5458 | |
| 5459 | /* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */ |
| 5460 | static void |
| 5461 | android_glPointParameterxv__ILjava_nio_IntBuffer_2 |
| 5462 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 5463 | jarray _array = (jarray) 0; |
| 5464 | jint _remaining; |
| 5465 | GLfixed *params = (GLfixed *) 0; |
| 5466 | |
| 5467 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 5468 | if (_remaining < 1) { |
| 5469 | _env->ThrowNew(IAEClass, "remaining() < 1"); |
| 5470 | goto exit; |
| 5471 | } |
| 5472 | glPointParameterxv( |
| 5473 | (GLenum)pname, |
| 5474 | (GLfixed *)params |
| 5475 | ); |
| 5476 | |
| 5477 | exit: |
| 5478 | if (_array) { |
| 5479 | releasePointer(_env, _array, params, JNI_FALSE); |
| 5480 | } |
| 5481 | } |
| 5482 | |
| 5483 | /* void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) */ |
| 5484 | static void |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 5485 | android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I |
| 5486 | (JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5487 | jarray _array = (jarray) 0; |
| 5488 | jint _remaining; |
| 5489 | GLvoid *pointer = (GLvoid *) 0; |
| 5490 | |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 5491 | if (pointer_buf) { |
| 5492 | pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); |
| 5493 | if ( ! pointer ) { |
| 5494 | return; |
| 5495 | } |
| 5496 | } |
| 5497 | glPointSizePointerOESBounds( |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5498 | (GLenum)type, |
| 5499 | (GLsizei)stride, |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 5500 | (GLvoid *)pointer, |
| 5501 | (GLsizei)remaining |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5502 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5503 | } |
| 5504 | |
| 5505 | /* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */ |
| 5506 | static void |
| 5507 | android_glTexCoordPointer__IIII |
| 5508 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) { |
| 5509 | glTexCoordPointer( |
| 5510 | (GLint)size, |
| 5511 | (GLenum)type, |
| 5512 | (GLsizei)stride, |
| 5513 | (const GLvoid *)offset |
| 5514 | ); |
| 5515 | } |
| 5516 | |
| 5517 | /* void glTexEnvi ( GLenum target, GLenum pname, GLint param ) */ |
| 5518 | static void |
| 5519 | android_glTexEnvi__III |
| 5520 | (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) { |
| 5521 | glTexEnvi( |
| 5522 | (GLenum)target, |
| 5523 | (GLenum)pname, |
| 5524 | (GLint)param |
| 5525 | ); |
| 5526 | } |
| 5527 | |
| 5528 | /* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */ |
| 5529 | static void |
| 5530 | android_glTexEnviv__II_3II |
| 5531 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 5532 | GLint *params_base = (GLint *) 0; |
| 5533 | jint _remaining; |
| 5534 | GLint *params = (GLint *) 0; |
| 5535 | |
| 5536 | if (!params_ref) { |
| 5537 | _env->ThrowNew(IAEClass, "params == null"); |
| 5538 | goto exit; |
| 5539 | } |
| 5540 | if (offset < 0) { |
| 5541 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5542 | goto exit; |
| 5543 | } |
| 5544 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 5545 | int _needed; |
| 5546 | switch (pname) { |
| 5547 | #if defined(GL_TEXTURE_ENV_MODE) |
| 5548 | case GL_TEXTURE_ENV_MODE: |
| 5549 | #endif // defined(GL_TEXTURE_ENV_MODE) |
| 5550 | #if defined(GL_COMBINE_RGB) |
| 5551 | case GL_COMBINE_RGB: |
| 5552 | #endif // defined(GL_COMBINE_RGB) |
| 5553 | #if defined(GL_COMBINE_ALPHA) |
| 5554 | case GL_COMBINE_ALPHA: |
| 5555 | #endif // defined(GL_COMBINE_ALPHA) |
| 5556 | _needed = 1; |
| 5557 | break; |
| 5558 | #if defined(GL_TEXTURE_ENV_COLOR) |
| 5559 | case GL_TEXTURE_ENV_COLOR: |
| 5560 | #endif // defined(GL_TEXTURE_ENV_COLOR) |
| 5561 | _needed = 4; |
| 5562 | break; |
| 5563 | default: |
| 5564 | _needed = 0; |
| 5565 | break; |
| 5566 | } |
| 5567 | if (_remaining < _needed) { |
| 5568 | _env->ThrowNew(IAEClass, "length - offset < needed"); |
| 5569 | goto exit; |
| 5570 | } |
| 5571 | params_base = (GLint *) |
| 5572 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 5573 | params = params_base + offset; |
| 5574 | |
| 5575 | glTexEnviv( |
| 5576 | (GLenum)target, |
| 5577 | (GLenum)pname, |
| 5578 | (GLint *)params |
| 5579 | ); |
| 5580 | |
| 5581 | exit: |
| 5582 | if (params_base) { |
| 5583 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 5584 | JNI_ABORT); |
| 5585 | } |
| 5586 | } |
| 5587 | |
| 5588 | /* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */ |
| 5589 | static void |
| 5590 | android_glTexEnviv__IILjava_nio_IntBuffer_2 |
| 5591 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
| 5592 | jarray _array = (jarray) 0; |
| 5593 | jint _remaining; |
| 5594 | GLint *params = (GLint *) 0; |
| 5595 | |
| 5596 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 5597 | int _needed; |
| 5598 | switch (pname) { |
| 5599 | #if defined(GL_TEXTURE_ENV_MODE) |
| 5600 | case GL_TEXTURE_ENV_MODE: |
| 5601 | #endif // defined(GL_TEXTURE_ENV_MODE) |
| 5602 | #if defined(GL_COMBINE_RGB) |
| 5603 | case GL_COMBINE_RGB: |
| 5604 | #endif // defined(GL_COMBINE_RGB) |
| 5605 | #if defined(GL_COMBINE_ALPHA) |
| 5606 | case GL_COMBINE_ALPHA: |
| 5607 | #endif // defined(GL_COMBINE_ALPHA) |
| 5608 | _needed = 1; |
| 5609 | break; |
| 5610 | #if defined(GL_TEXTURE_ENV_COLOR) |
| 5611 | case GL_TEXTURE_ENV_COLOR: |
| 5612 | #endif // defined(GL_TEXTURE_ENV_COLOR) |
| 5613 | _needed = 4; |
| 5614 | break; |
| 5615 | default: |
| 5616 | _needed = 0; |
| 5617 | break; |
| 5618 | } |
| 5619 | if (_remaining < _needed) { |
| 5620 | _env->ThrowNew(IAEClass, "remaining() < needed"); |
| 5621 | goto exit; |
| 5622 | } |
| 5623 | glTexEnviv( |
| 5624 | (GLenum)target, |
| 5625 | (GLenum)pname, |
| 5626 | (GLint *)params |
| 5627 | ); |
| 5628 | |
| 5629 | exit: |
| 5630 | if (_array) { |
| 5631 | releasePointer(_env, _array, params, JNI_FALSE); |
| 5632 | } |
| 5633 | } |
| 5634 | |
| 5635 | /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */ |
| 5636 | static void |
| 5637 | android_glTexParameterfv__II_3FI |
| 5638 | (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { |
| 5639 | GLfloat *params_base = (GLfloat *) 0; |
| 5640 | jint _remaining; |
| 5641 | GLfloat *params = (GLfloat *) 0; |
| 5642 | |
| 5643 | if (!params_ref) { |
| 5644 | _env->ThrowNew(IAEClass, "params == null"); |
| 5645 | goto exit; |
| 5646 | } |
| 5647 | if (offset < 0) { |
| 5648 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5649 | goto exit; |
| 5650 | } |
| 5651 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 5652 | if (_remaining < 1) { |
| 5653 | _env->ThrowNew(IAEClass, "length - offset < 1"); |
| 5654 | goto exit; |
| 5655 | } |
| 5656 | params_base = (GLfloat *) |
| 5657 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 5658 | params = params_base + offset; |
| 5659 | |
| 5660 | glTexParameterfv( |
| 5661 | (GLenum)target, |
| 5662 | (GLenum)pname, |
| 5663 | (GLfloat *)params |
| 5664 | ); |
| 5665 | |
| 5666 | exit: |
| 5667 | if (params_base) { |
| 5668 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 5669 | JNI_ABORT); |
| 5670 | } |
| 5671 | } |
| 5672 | |
| 5673 | /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */ |
| 5674 | static void |
| 5675 | android_glTexParameterfv__IILjava_nio_FloatBuffer_2 |
| 5676 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
| 5677 | jarray _array = (jarray) 0; |
| 5678 | jint _remaining; |
| 5679 | GLfloat *params = (GLfloat *) 0; |
| 5680 | |
| 5681 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 5682 | if (_remaining < 1) { |
| 5683 | _env->ThrowNew(IAEClass, "remaining() < 1"); |
| 5684 | goto exit; |
| 5685 | } |
| 5686 | glTexParameterfv( |
| 5687 | (GLenum)target, |
| 5688 | (GLenum)pname, |
| 5689 | (GLfloat *)params |
| 5690 | ); |
| 5691 | |
| 5692 | exit: |
| 5693 | if (_array) { |
| 5694 | releasePointer(_env, _array, params, JNI_FALSE); |
| 5695 | } |
| 5696 | } |
| 5697 | |
| 5698 | /* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */ |
| 5699 | static void |
| 5700 | android_glTexParameteri__III |
| 5701 | (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) { |
| 5702 | glTexParameteri( |
| 5703 | (GLenum)target, |
| 5704 | (GLenum)pname, |
| 5705 | (GLint)param |
| 5706 | ); |
| 5707 | } |
| 5708 | |
| 5709 | /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */ |
| 5710 | static void |
| 5711 | android_glTexParameteriv__II_3II |
| 5712 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 5713 | GLint *params_base = (GLint *) 0; |
| 5714 | jint _remaining; |
| 5715 | GLint *params = (GLint *) 0; |
| 5716 | |
| 5717 | if (!params_ref) { |
| 5718 | _env->ThrowNew(IAEClass, "params == null"); |
| 5719 | goto exit; |
| 5720 | } |
| 5721 | if (offset < 0) { |
| 5722 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5723 | goto exit; |
| 5724 | } |
| 5725 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 5726 | if (_remaining < 1) { |
| 5727 | _env->ThrowNew(IAEClass, "length - offset < 1"); |
| 5728 | goto exit; |
| 5729 | } |
| 5730 | params_base = (GLint *) |
| 5731 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 5732 | params = params_base + offset; |
| 5733 | |
| 5734 | glTexParameteriv( |
| 5735 | (GLenum)target, |
| 5736 | (GLenum)pname, |
| 5737 | (GLint *)params |
| 5738 | ); |
| 5739 | |
| 5740 | exit: |
| 5741 | if (params_base) { |
| 5742 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 5743 | JNI_ABORT); |
| 5744 | } |
| 5745 | } |
| 5746 | |
| 5747 | /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */ |
| 5748 | static void |
| 5749 | android_glTexParameteriv__IILjava_nio_IntBuffer_2 |
| 5750 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
| 5751 | jarray _array = (jarray) 0; |
| 5752 | jint _remaining; |
| 5753 | GLint *params = (GLint *) 0; |
| 5754 | |
| 5755 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 5756 | if (_remaining < 1) { |
| 5757 | _env->ThrowNew(IAEClass, "remaining() < 1"); |
| 5758 | goto exit; |
| 5759 | } |
| 5760 | glTexParameteriv( |
| 5761 | (GLenum)target, |
| 5762 | (GLenum)pname, |
| 5763 | (GLint *)params |
| 5764 | ); |
| 5765 | |
| 5766 | exit: |
| 5767 | if (_array) { |
| 5768 | releasePointer(_env, _array, params, JNI_FALSE); |
| 5769 | } |
| 5770 | } |
| 5771 | |
| 5772 | /* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */ |
| 5773 | static void |
| 5774 | android_glTexParameterxv__II_3II |
| 5775 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 5776 | GLfixed *params_base = (GLfixed *) 0; |
| 5777 | jint _remaining; |
| 5778 | GLfixed *params = (GLfixed *) 0; |
| 5779 | |
| 5780 | if (!params_ref) { |
| 5781 | _env->ThrowNew(IAEClass, "params == null"); |
| 5782 | goto exit; |
| 5783 | } |
| 5784 | if (offset < 0) { |
| 5785 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5786 | goto exit; |
| 5787 | } |
| 5788 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 5789 | if (_remaining < 1) { |
| 5790 | _env->ThrowNew(IAEClass, "length - offset < 1"); |
| 5791 | goto exit; |
| 5792 | } |
| 5793 | params_base = (GLfixed *) |
| 5794 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 5795 | params = params_base + offset; |
| 5796 | |
| 5797 | glTexParameterxv( |
| 5798 | (GLenum)target, |
| 5799 | (GLenum)pname, |
| 5800 | (GLfixed *)params |
| 5801 | ); |
| 5802 | |
| 5803 | exit: |
| 5804 | if (params_base) { |
| 5805 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 5806 | JNI_ABORT); |
| 5807 | } |
| 5808 | } |
| 5809 | |
| 5810 | /* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */ |
| 5811 | static void |
| 5812 | android_glTexParameterxv__IILjava_nio_IntBuffer_2 |
| 5813 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
| 5814 | jarray _array = (jarray) 0; |
| 5815 | jint _remaining; |
| 5816 | GLfixed *params = (GLfixed *) 0; |
| 5817 | |
| 5818 | params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); |
| 5819 | if (_remaining < 1) { |
| 5820 | _env->ThrowNew(IAEClass, "remaining() < 1"); |
| 5821 | goto exit; |
| 5822 | } |
| 5823 | glTexParameterxv( |
| 5824 | (GLenum)target, |
| 5825 | (GLenum)pname, |
| 5826 | (GLfixed *)params |
| 5827 | ); |
| 5828 | |
| 5829 | exit: |
| 5830 | if (_array) { |
| 5831 | releasePointer(_env, _array, params, JNI_FALSE); |
| 5832 | } |
| 5833 | } |
| 5834 | |
| 5835 | /* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */ |
| 5836 | static void |
| 5837 | android_glVertexPointer__IIII |
| 5838 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) { |
| 5839 | glVertexPointer( |
| 5840 | (GLint)size, |
| 5841 | (GLenum)type, |
| 5842 | (GLsizei)stride, |
| 5843 | (const GLvoid *)offset |
| 5844 | ); |
| 5845 | } |
| 5846 | |
| 5847 | /* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */ |
| 5848 | static void |
| 5849 | android_glCurrentPaletteMatrixOES__I |
| 5850 | (JNIEnv *_env, jobject _this, jint matrixpaletteindex) { |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 5851 | glCurrentPaletteMatrixOES( |
| 5852 | (GLuint)matrixpaletteindex |
| 5853 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5854 | } |
| 5855 | |
| 5856 | /* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */ |
| 5857 | static void |
| 5858 | android_glDrawTexfOES__FFFFF |
| 5859 | (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) { |
| 5860 | glDrawTexfOES( |
| 5861 | (GLfloat)x, |
| 5862 | (GLfloat)y, |
| 5863 | (GLfloat)z, |
| 5864 | (GLfloat)width, |
| 5865 | (GLfloat)height |
| 5866 | ); |
| 5867 | } |
| 5868 | |
| 5869 | /* void glDrawTexfvOES ( const GLfloat *coords ) */ |
| 5870 | static void |
| 5871 | android_glDrawTexfvOES___3FI |
| 5872 | (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) { |
| 5873 | GLfloat *coords_base = (GLfloat *) 0; |
| 5874 | jint _remaining; |
| 5875 | GLfloat *coords = (GLfloat *) 0; |
| 5876 | |
| 5877 | if (!coords_ref) { |
| 5878 | _env->ThrowNew(IAEClass, "coords == null"); |
| 5879 | goto exit; |
| 5880 | } |
| 5881 | if (offset < 0) { |
| 5882 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5883 | goto exit; |
| 5884 | } |
| 5885 | _remaining = _env->GetArrayLength(coords_ref) - offset; |
| 5886 | if (_remaining < 5) { |
| 5887 | _env->ThrowNew(IAEClass, "length - offset < 5"); |
| 5888 | goto exit; |
| 5889 | } |
| 5890 | coords_base = (GLfloat *) |
| 5891 | _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0); |
| 5892 | coords = coords_base + offset; |
| 5893 | |
| 5894 | glDrawTexfvOES( |
| 5895 | (GLfloat *)coords |
| 5896 | ); |
| 5897 | |
| 5898 | exit: |
| 5899 | if (coords_base) { |
| 5900 | _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, |
| 5901 | JNI_ABORT); |
| 5902 | } |
| 5903 | } |
| 5904 | |
| 5905 | /* void glDrawTexfvOES ( const GLfloat *coords ) */ |
| 5906 | static void |
| 5907 | android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 |
| 5908 | (JNIEnv *_env, jobject _this, jobject coords_buf) { |
| 5909 | jarray _array = (jarray) 0; |
| 5910 | jint _remaining; |
| 5911 | GLfloat *coords = (GLfloat *) 0; |
| 5912 | |
| 5913 | coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining); |
| 5914 | if (_remaining < 5) { |
| 5915 | _env->ThrowNew(IAEClass, "remaining() < 5"); |
| 5916 | goto exit; |
| 5917 | } |
| 5918 | glDrawTexfvOES( |
| 5919 | (GLfloat *)coords |
| 5920 | ); |
| 5921 | |
| 5922 | exit: |
| 5923 | if (_array) { |
| 5924 | releasePointer(_env, _array, coords, JNI_FALSE); |
| 5925 | } |
| 5926 | } |
| 5927 | |
| 5928 | /* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */ |
| 5929 | static void |
| 5930 | android_glDrawTexiOES__IIIII |
| 5931 | (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) { |
| 5932 | glDrawTexiOES( |
| 5933 | (GLint)x, |
| 5934 | (GLint)y, |
| 5935 | (GLint)z, |
| 5936 | (GLint)width, |
| 5937 | (GLint)height |
| 5938 | ); |
| 5939 | } |
| 5940 | |
| 5941 | /* void glDrawTexivOES ( const GLint *coords ) */ |
| 5942 | static void |
| 5943 | android_glDrawTexivOES___3II |
| 5944 | (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) { |
| 5945 | GLint *coords_base = (GLint *) 0; |
| 5946 | jint _remaining; |
| 5947 | GLint *coords = (GLint *) 0; |
| 5948 | |
| 5949 | if (!coords_ref) { |
| 5950 | _env->ThrowNew(IAEClass, "coords == null"); |
| 5951 | goto exit; |
| 5952 | } |
| 5953 | if (offset < 0) { |
| 5954 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 5955 | goto exit; |
| 5956 | } |
| 5957 | _remaining = _env->GetArrayLength(coords_ref) - offset; |
| 5958 | if (_remaining < 5) { |
| 5959 | _env->ThrowNew(IAEClass, "length - offset < 5"); |
| 5960 | goto exit; |
| 5961 | } |
| 5962 | coords_base = (GLint *) |
| 5963 | _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0); |
| 5964 | coords = coords_base + offset; |
| 5965 | |
| 5966 | glDrawTexivOES( |
| 5967 | (GLint *)coords |
| 5968 | ); |
| 5969 | |
| 5970 | exit: |
| 5971 | if (coords_base) { |
| 5972 | _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, |
| 5973 | JNI_ABORT); |
| 5974 | } |
| 5975 | } |
| 5976 | |
| 5977 | /* void glDrawTexivOES ( const GLint *coords ) */ |
| 5978 | static void |
| 5979 | android_glDrawTexivOES__Ljava_nio_IntBuffer_2 |
| 5980 | (JNIEnv *_env, jobject _this, jobject coords_buf) { |
| 5981 | jarray _array = (jarray) 0; |
| 5982 | jint _remaining; |
| 5983 | GLint *coords = (GLint *) 0; |
| 5984 | |
| 5985 | coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining); |
| 5986 | if (_remaining < 5) { |
| 5987 | _env->ThrowNew(IAEClass, "remaining() < 5"); |
| 5988 | goto exit; |
| 5989 | } |
| 5990 | glDrawTexivOES( |
| 5991 | (GLint *)coords |
| 5992 | ); |
| 5993 | |
| 5994 | exit: |
| 5995 | if (_array) { |
| 5996 | releasePointer(_env, _array, coords, JNI_FALSE); |
| 5997 | } |
| 5998 | } |
| 5999 | |
| 6000 | /* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */ |
| 6001 | static void |
| 6002 | android_glDrawTexsOES__SSSSS |
| 6003 | (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) { |
| 6004 | glDrawTexsOES( |
| 6005 | (GLshort)x, |
| 6006 | (GLshort)y, |
| 6007 | (GLshort)z, |
| 6008 | (GLshort)width, |
| 6009 | (GLshort)height |
| 6010 | ); |
| 6011 | } |
| 6012 | |
| 6013 | /* void glDrawTexsvOES ( const GLshort *coords ) */ |
| 6014 | static void |
| 6015 | android_glDrawTexsvOES___3SI |
| 6016 | (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) { |
| 6017 | GLshort *coords_base = (GLshort *) 0; |
| 6018 | jint _remaining; |
| 6019 | GLshort *coords = (GLshort *) 0; |
| 6020 | |
| 6021 | if (!coords_ref) { |
| 6022 | _env->ThrowNew(IAEClass, "coords == null"); |
| 6023 | goto exit; |
| 6024 | } |
| 6025 | if (offset < 0) { |
| 6026 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6027 | goto exit; |
| 6028 | } |
| 6029 | _remaining = _env->GetArrayLength(coords_ref) - offset; |
| 6030 | if (_remaining < 5) { |
| 6031 | _env->ThrowNew(IAEClass, "length - offset < 5"); |
| 6032 | goto exit; |
| 6033 | } |
| 6034 | coords_base = (GLshort *) |
| 6035 | _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0); |
| 6036 | coords = coords_base + offset; |
| 6037 | |
| 6038 | glDrawTexsvOES( |
| 6039 | (GLshort *)coords |
| 6040 | ); |
| 6041 | |
| 6042 | exit: |
| 6043 | if (coords_base) { |
| 6044 | _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, |
| 6045 | JNI_ABORT); |
| 6046 | } |
| 6047 | } |
| 6048 | |
| 6049 | /* void glDrawTexsvOES ( const GLshort *coords ) */ |
| 6050 | static void |
| 6051 | android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 |
| 6052 | (JNIEnv *_env, jobject _this, jobject coords_buf) { |
| 6053 | jarray _array = (jarray) 0; |
| 6054 | jint _remaining; |
| 6055 | GLshort *coords = (GLshort *) 0; |
| 6056 | |
| 6057 | coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining); |
| 6058 | if (_remaining < 5) { |
| 6059 | _env->ThrowNew(IAEClass, "remaining() < 5"); |
| 6060 | goto exit; |
| 6061 | } |
| 6062 | glDrawTexsvOES( |
| 6063 | (GLshort *)coords |
| 6064 | ); |
| 6065 | |
| 6066 | exit: |
| 6067 | if (_array) { |
| 6068 | releasePointer(_env, _array, coords, JNI_FALSE); |
| 6069 | } |
| 6070 | } |
| 6071 | |
| 6072 | /* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */ |
| 6073 | static void |
| 6074 | android_glDrawTexxOES__IIIII |
| 6075 | (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) { |
| 6076 | glDrawTexxOES( |
| 6077 | (GLfixed)x, |
| 6078 | (GLfixed)y, |
| 6079 | (GLfixed)z, |
| 6080 | (GLfixed)width, |
| 6081 | (GLfixed)height |
| 6082 | ); |
| 6083 | } |
| 6084 | |
| 6085 | /* void glDrawTexxvOES ( const GLfixed *coords ) */ |
| 6086 | static void |
| 6087 | android_glDrawTexxvOES___3II |
| 6088 | (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) { |
| 6089 | GLfixed *coords_base = (GLfixed *) 0; |
| 6090 | jint _remaining; |
| 6091 | GLfixed *coords = (GLfixed *) 0; |
| 6092 | |
| 6093 | if (!coords_ref) { |
| 6094 | _env->ThrowNew(IAEClass, "coords == null"); |
| 6095 | goto exit; |
| 6096 | } |
| 6097 | if (offset < 0) { |
| 6098 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6099 | goto exit; |
| 6100 | } |
| 6101 | _remaining = _env->GetArrayLength(coords_ref) - offset; |
| 6102 | if (_remaining < 5) { |
| 6103 | _env->ThrowNew(IAEClass, "length - offset < 5"); |
| 6104 | goto exit; |
| 6105 | } |
| 6106 | coords_base = (GLfixed *) |
| 6107 | _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0); |
| 6108 | coords = coords_base + offset; |
| 6109 | |
| 6110 | glDrawTexxvOES( |
| 6111 | (GLfixed *)coords |
| 6112 | ); |
| 6113 | |
| 6114 | exit: |
| 6115 | if (coords_base) { |
| 6116 | _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, |
| 6117 | JNI_ABORT); |
| 6118 | } |
| 6119 | } |
| 6120 | |
| 6121 | /* void glDrawTexxvOES ( const GLfixed *coords ) */ |
| 6122 | static void |
| 6123 | android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 |
| 6124 | (JNIEnv *_env, jobject _this, jobject coords_buf) { |
| 6125 | jarray _array = (jarray) 0; |
| 6126 | jint _remaining; |
| 6127 | GLfixed *coords = (GLfixed *) 0; |
| 6128 | |
| 6129 | coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining); |
| 6130 | if (_remaining < 5) { |
| 6131 | _env->ThrowNew(IAEClass, "remaining() < 5"); |
| 6132 | goto exit; |
| 6133 | } |
| 6134 | glDrawTexxvOES( |
| 6135 | (GLfixed *)coords |
| 6136 | ); |
| 6137 | |
| 6138 | exit: |
| 6139 | if (_array) { |
| 6140 | releasePointer(_env, _array, coords, JNI_FALSE); |
| 6141 | } |
| 6142 | } |
| 6143 | |
| 6144 | /* void glLoadPaletteFromModelViewMatrixOES ( void ) */ |
| 6145 | static void |
| 6146 | android_glLoadPaletteFromModelViewMatrixOES__ |
| 6147 | (JNIEnv *_env, jobject _this) { |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 6148 | glLoadPaletteFromModelViewMatrixOES(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6149 | } |
| 6150 | |
| 6151 | /* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */ |
| 6152 | static void |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 6153 | android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I |
| 6154 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) { |
| 6155 | jarray _array = (jarray) 0; |
| 6156 | jint _remaining; |
| 6157 | GLvoid *pointer = (GLvoid *) 0; |
| 6158 | |
| 6159 | if (pointer_buf) { |
| 6160 | pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); |
| 6161 | if ( ! pointer ) { |
| 6162 | return; |
| 6163 | } |
| 6164 | } |
| 6165 | glMatrixIndexPointerOESBounds( |
| 6166 | (GLint)size, |
| 6167 | (GLenum)type, |
| 6168 | (GLsizei)stride, |
| 6169 | (GLvoid *)pointer, |
| 6170 | (GLsizei)remaining |
| 6171 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6172 | } |
| 6173 | |
| 6174 | /* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */ |
| 6175 | static void |
| 6176 | android_glMatrixIndexPointerOES__IIII |
| 6177 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) { |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 6178 | glMatrixIndexPointerOES( |
| 6179 | (GLint)size, |
| 6180 | (GLenum)type, |
| 6181 | (GLsizei)stride, |
| 6182 | (const GLvoid *)offset |
| 6183 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6184 | } |
| 6185 | |
| 6186 | /* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */ |
| 6187 | static void |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 6188 | android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I |
| 6189 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) { |
| 6190 | jarray _array = (jarray) 0; |
| 6191 | jint _remaining; |
| 6192 | GLvoid *pointer = (GLvoid *) 0; |
| 6193 | |
| 6194 | if (pointer_buf) { |
| 6195 | pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); |
| 6196 | if ( ! pointer ) { |
| 6197 | return; |
| 6198 | } |
| 6199 | } |
| 6200 | glWeightPointerOESBounds( |
| 6201 | (GLint)size, |
| 6202 | (GLenum)type, |
| 6203 | (GLsizei)stride, |
| 6204 | (GLvoid *)pointer, |
| 6205 | (GLsizei)remaining |
| 6206 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6207 | } |
| 6208 | |
| 6209 | /* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */ |
| 6210 | static void |
| 6211 | android_glWeightPointerOES__IIII |
| 6212 | (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) { |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 6213 | glWeightPointerOES( |
| 6214 | (GLint)size, |
| 6215 | (GLenum)type, |
| 6216 | (GLsizei)stride, |
| 6217 | (const GLvoid *)offset |
| 6218 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6219 | } |
| 6220 | |
| 6221 | /* void glBindFramebufferOES ( GLint target, GLint framebuffer ) */ |
| 6222 | static void |
| 6223 | android_glBindFramebufferOES__II |
| 6224 | (JNIEnv *_env, jobject _this, jint target, jint framebuffer) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6225 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6226 | _env->ThrowNew(UOEClass, |
| 6227 | "glBindFramebufferOES"); |
| 6228 | return; |
| 6229 | } |
| 6230 | glBindFramebufferOES( |
| 6231 | (GLint)target, |
| 6232 | (GLint)framebuffer |
| 6233 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6234 | } |
| 6235 | |
| 6236 | /* void glBindRenderbufferOES ( GLint target, GLint renderbuffer ) */ |
| 6237 | static void |
| 6238 | android_glBindRenderbufferOES__II |
| 6239 | (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6240 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6241 | _env->ThrowNew(UOEClass, |
| 6242 | "glBindRenderbufferOES"); |
| 6243 | return; |
| 6244 | } |
| 6245 | glBindRenderbufferOES( |
| 6246 | (GLint)target, |
| 6247 | (GLint)renderbuffer |
| 6248 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6249 | } |
| 6250 | |
| 6251 | /* void glBlendEquation ( GLint mode ) */ |
| 6252 | static void |
| 6253 | android_glBlendEquation__I |
| 6254 | (JNIEnv *_env, jobject _this, jint mode) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6255 | if (! supportsExtension(_env, _this, have_OES_blend_subtractID)) { |
| 6256 | _env->ThrowNew(UOEClass, |
| 6257 | "glBlendEquation"); |
| 6258 | return; |
| 6259 | } |
| 6260 | glBlendEquation( |
| 6261 | (GLint)mode |
| 6262 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6263 | } |
| 6264 | |
| 6265 | /* void glBlendEquationSeparate ( GLint modeRGB, GLint modeAlpha ) */ |
| 6266 | static void |
| 6267 | android_glBlendEquationSeparate__II |
| 6268 | (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6269 | if (! supportsExtension(_env, _this, have_OES_blend_equation_separateID)) { |
| 6270 | _env->ThrowNew(UOEClass, |
| 6271 | "glBlendEquationSeparate"); |
| 6272 | return; |
| 6273 | } |
| 6274 | glBlendEquationSeparate( |
| 6275 | (GLint)modeRGB, |
| 6276 | (GLint)modeAlpha |
| 6277 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6278 | } |
| 6279 | |
| 6280 | /* void glBlendFuncSeparate ( GLint srcRGB, GLint dstRGB, GLint srcAlpha, GLint dstAlpha ) */ |
| 6281 | static void |
| 6282 | android_glBlendFuncSeparate__IIII |
| 6283 | (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6284 | if (! supportsExtension(_env, _this, have_OES_blend_equation_separateID)) { |
| 6285 | _env->ThrowNew(UOEClass, |
| 6286 | "glBlendFuncSeparate"); |
| 6287 | return; |
| 6288 | } |
| 6289 | glBlendFuncSeparate( |
| 6290 | (GLint)srcRGB, |
| 6291 | (GLint)dstRGB, |
| 6292 | (GLint)srcAlpha, |
| 6293 | (GLint)dstAlpha |
| 6294 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6295 | } |
| 6296 | |
| 6297 | /* GLint glCheckFramebufferStatusOES ( GLint target ) */ |
| 6298 | static jint |
| 6299 | android_glCheckFramebufferStatusOES__I |
| 6300 | (JNIEnv *_env, jobject _this, jint target) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6301 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6302 | _env->ThrowNew(UOEClass, |
| 6303 | "glCheckFramebufferStatusOES"); |
| 6304 | return 0; |
| 6305 | } |
| 6306 | GLint _returnValue = 0; |
| 6307 | _returnValue = glCheckFramebufferStatusOES( |
| 6308 | (GLint)target |
| 6309 | ); |
| 6310 | return _returnValue; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6311 | } |
| 6312 | |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6313 | /* void glDeleteFramebuffersOES ( GLint n, GLuint *framebuffers ) */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6314 | static void |
| 6315 | android_glDeleteFramebuffersOES__I_3II |
| 6316 | (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6317 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6318 | _env->ThrowNew(UOEClass, |
| 6319 | "glDeleteFramebuffersOES"); |
| 6320 | return; |
| 6321 | } |
| 6322 | jint _exception = 0; |
| 6323 | GLuint *framebuffers_base = (GLuint *) 0; |
| 6324 | jint _remaining; |
| 6325 | GLuint *framebuffers = (GLuint *) 0; |
| 6326 | |
| 6327 | if (!framebuffers_ref) { |
| 6328 | _exception = 1; |
| 6329 | _env->ThrowNew(IAEClass, "framebuffers == null"); |
| 6330 | goto exit; |
| 6331 | } |
| 6332 | if (offset < 0) { |
| 6333 | _exception = 1; |
| 6334 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6335 | goto exit; |
| 6336 | } |
| 6337 | _remaining = _env->GetArrayLength(framebuffers_ref) - offset; |
| 6338 | if (_remaining < n) { |
| 6339 | _exception = 1; |
| 6340 | _env->ThrowNew(IAEClass, "length - offset < n"); |
| 6341 | goto exit; |
| 6342 | } |
| 6343 | framebuffers_base = (GLuint *) |
| 6344 | _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0); |
| 6345 | framebuffers = framebuffers_base + offset; |
| 6346 | |
| 6347 | glDeleteFramebuffersOES( |
| 6348 | (GLint)n, |
| 6349 | (GLuint *)framebuffers |
| 6350 | ); |
| 6351 | |
| 6352 | exit: |
| 6353 | if (framebuffers_base) { |
| 6354 | _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, |
| 6355 | _exception ? JNI_ABORT: 0); |
| 6356 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6357 | } |
| 6358 | |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6359 | /* void glDeleteFramebuffersOES ( GLint n, GLuint *framebuffers ) */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6360 | static void |
| 6361 | android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 |
| 6362 | (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6363 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6364 | _env->ThrowNew(UOEClass, |
| 6365 | "glDeleteFramebuffersOES"); |
| 6366 | return; |
| 6367 | } |
| 6368 | jint _exception = 0; |
| 6369 | jarray _array = (jarray) 0; |
| 6370 | jint _remaining; |
| 6371 | GLuint *framebuffers = (GLuint *) 0; |
| 6372 | |
| 6373 | framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining); |
| 6374 | if (_remaining < n) { |
| 6375 | _exception = 1; |
| 6376 | _env->ThrowNew(IAEClass, "remaining() < n"); |
| 6377 | goto exit; |
| 6378 | } |
| 6379 | glDeleteFramebuffersOES( |
| 6380 | (GLint)n, |
| 6381 | (GLuint *)framebuffers |
| 6382 | ); |
| 6383 | |
| 6384 | exit: |
| 6385 | if (_array) { |
| 6386 | releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE); |
| 6387 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6388 | } |
| 6389 | |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6390 | /* void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6391 | static void |
| 6392 | android_glDeleteRenderbuffersOES__I_3II |
| 6393 | (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6394 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6395 | _env->ThrowNew(UOEClass, |
| 6396 | "glDeleteRenderbuffersOES"); |
| 6397 | return; |
| 6398 | } |
| 6399 | jint _exception = 0; |
| 6400 | GLuint *renderbuffers_base = (GLuint *) 0; |
| 6401 | jint _remaining; |
| 6402 | GLuint *renderbuffers = (GLuint *) 0; |
| 6403 | |
| 6404 | if (!renderbuffers_ref) { |
| 6405 | _exception = 1; |
| 6406 | _env->ThrowNew(IAEClass, "renderbuffers == null"); |
| 6407 | goto exit; |
| 6408 | } |
| 6409 | if (offset < 0) { |
| 6410 | _exception = 1; |
| 6411 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6412 | goto exit; |
| 6413 | } |
| 6414 | _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; |
| 6415 | if (_remaining < n) { |
| 6416 | _exception = 1; |
| 6417 | _env->ThrowNew(IAEClass, "length - offset < n"); |
| 6418 | goto exit; |
| 6419 | } |
| 6420 | renderbuffers_base = (GLuint *) |
| 6421 | _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0); |
| 6422 | renderbuffers = renderbuffers_base + offset; |
| 6423 | |
| 6424 | glDeleteRenderbuffersOES( |
| 6425 | (GLint)n, |
| 6426 | (GLuint *)renderbuffers |
| 6427 | ); |
| 6428 | |
| 6429 | exit: |
| 6430 | if (renderbuffers_base) { |
| 6431 | _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, |
| 6432 | _exception ? JNI_ABORT: 0); |
| 6433 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6434 | } |
| 6435 | |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6436 | /* void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6437 | static void |
| 6438 | android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 |
| 6439 | (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6440 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6441 | _env->ThrowNew(UOEClass, |
| 6442 | "glDeleteRenderbuffersOES"); |
| 6443 | return; |
| 6444 | } |
| 6445 | jint _exception = 0; |
| 6446 | jarray _array = (jarray) 0; |
| 6447 | jint _remaining; |
| 6448 | GLuint *renderbuffers = (GLuint *) 0; |
| 6449 | |
| 6450 | renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining); |
| 6451 | if (_remaining < n) { |
| 6452 | _exception = 1; |
| 6453 | _env->ThrowNew(IAEClass, "remaining() < n"); |
| 6454 | goto exit; |
| 6455 | } |
| 6456 | glDeleteRenderbuffersOES( |
| 6457 | (GLint)n, |
| 6458 | (GLuint *)renderbuffers |
| 6459 | ); |
| 6460 | |
| 6461 | exit: |
| 6462 | if (_array) { |
| 6463 | releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE); |
| 6464 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6465 | } |
| 6466 | |
| 6467 | /* void glFramebufferRenderbufferOES ( GLint target, GLint attachment, GLint renderbuffertarget, GLint renderbuffer ) */ |
| 6468 | static void |
| 6469 | android_glFramebufferRenderbufferOES__IIII |
| 6470 | (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6471 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6472 | _env->ThrowNew(UOEClass, |
| 6473 | "glFramebufferRenderbufferOES"); |
| 6474 | return; |
| 6475 | } |
| 6476 | glFramebufferRenderbufferOES( |
| 6477 | (GLint)target, |
| 6478 | (GLint)attachment, |
| 6479 | (GLint)renderbuffertarget, |
| 6480 | (GLint)renderbuffer |
| 6481 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6482 | } |
| 6483 | |
| 6484 | /* void glFramebufferTexture2DOES ( GLint target, GLint attachment, GLint textarget, GLint texture, GLint level ) */ |
| 6485 | static void |
| 6486 | android_glFramebufferTexture2DOES__IIIII |
| 6487 | (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6488 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6489 | _env->ThrowNew(UOEClass, |
| 6490 | "glFramebufferTexture2DOES"); |
| 6491 | return; |
| 6492 | } |
| 6493 | glFramebufferTexture2DOES( |
| 6494 | (GLint)target, |
| 6495 | (GLint)attachment, |
| 6496 | (GLint)textarget, |
| 6497 | (GLint)texture, |
| 6498 | (GLint)level |
| 6499 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6500 | } |
| 6501 | |
| 6502 | /* void glGenerateMipmapOES ( GLint target ) */ |
| 6503 | static void |
| 6504 | android_glGenerateMipmapOES__I |
| 6505 | (JNIEnv *_env, jobject _this, jint target) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6506 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6507 | _env->ThrowNew(UOEClass, |
| 6508 | "glGenerateMipmapOES"); |
| 6509 | return; |
| 6510 | } |
| 6511 | glGenerateMipmapOES( |
| 6512 | (GLint)target |
| 6513 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6514 | } |
| 6515 | |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6516 | /* void glGenFramebuffersOES ( GLint n, GLuint *framebuffers ) */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6517 | static void |
| 6518 | android_glGenFramebuffersOES__I_3II |
| 6519 | (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6520 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6521 | _env->ThrowNew(UOEClass, |
| 6522 | "glGenFramebuffersOES"); |
| 6523 | return; |
| 6524 | } |
| 6525 | jint _exception = 0; |
| 6526 | GLuint *framebuffers_base = (GLuint *) 0; |
| 6527 | jint _remaining; |
| 6528 | GLuint *framebuffers = (GLuint *) 0; |
| 6529 | |
| 6530 | if (!framebuffers_ref) { |
| 6531 | _exception = 1; |
| 6532 | _env->ThrowNew(IAEClass, "framebuffers == null"); |
| 6533 | goto exit; |
| 6534 | } |
| 6535 | if (offset < 0) { |
| 6536 | _exception = 1; |
| 6537 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6538 | goto exit; |
| 6539 | } |
| 6540 | _remaining = _env->GetArrayLength(framebuffers_ref) - offset; |
| 6541 | if (_remaining < n) { |
| 6542 | _exception = 1; |
| 6543 | _env->ThrowNew(IAEClass, "length - offset < n"); |
| 6544 | goto exit; |
| 6545 | } |
| 6546 | framebuffers_base = (GLuint *) |
| 6547 | _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0); |
| 6548 | framebuffers = framebuffers_base + offset; |
| 6549 | |
| 6550 | glGenFramebuffersOES( |
| 6551 | (GLint)n, |
| 6552 | (GLuint *)framebuffers |
| 6553 | ); |
| 6554 | |
| 6555 | exit: |
| 6556 | if (framebuffers_base) { |
| 6557 | _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, |
| 6558 | _exception ? JNI_ABORT: 0); |
| 6559 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6560 | } |
| 6561 | |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6562 | /* void glGenFramebuffersOES ( GLint n, GLuint *framebuffers ) */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6563 | static void |
| 6564 | android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 |
| 6565 | (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6566 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6567 | _env->ThrowNew(UOEClass, |
| 6568 | "glGenFramebuffersOES"); |
| 6569 | return; |
| 6570 | } |
| 6571 | jint _exception = 0; |
| 6572 | jarray _array = (jarray) 0; |
| 6573 | jint _remaining; |
| 6574 | GLuint *framebuffers = (GLuint *) 0; |
| 6575 | |
| 6576 | framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining); |
| 6577 | if (_remaining < n) { |
| 6578 | _exception = 1; |
| 6579 | _env->ThrowNew(IAEClass, "remaining() < n"); |
| 6580 | goto exit; |
| 6581 | } |
| 6582 | glGenFramebuffersOES( |
| 6583 | (GLint)n, |
| 6584 | (GLuint *)framebuffers |
| 6585 | ); |
| 6586 | |
| 6587 | exit: |
| 6588 | if (_array) { |
| 6589 | releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE); |
| 6590 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6591 | } |
| 6592 | |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6593 | /* void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6594 | static void |
| 6595 | android_glGenRenderbuffersOES__I_3II |
| 6596 | (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6597 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6598 | _env->ThrowNew(UOEClass, |
| 6599 | "glGenRenderbuffersOES"); |
| 6600 | return; |
| 6601 | } |
| 6602 | jint _exception = 0; |
| 6603 | GLuint *renderbuffers_base = (GLuint *) 0; |
| 6604 | jint _remaining; |
| 6605 | GLuint *renderbuffers = (GLuint *) 0; |
| 6606 | |
| 6607 | if (!renderbuffers_ref) { |
| 6608 | _exception = 1; |
| 6609 | _env->ThrowNew(IAEClass, "renderbuffers == null"); |
| 6610 | goto exit; |
| 6611 | } |
| 6612 | if (offset < 0) { |
| 6613 | _exception = 1; |
| 6614 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6615 | goto exit; |
| 6616 | } |
| 6617 | _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; |
| 6618 | if (_remaining < n) { |
| 6619 | _exception = 1; |
| 6620 | _env->ThrowNew(IAEClass, "length - offset < n"); |
| 6621 | goto exit; |
| 6622 | } |
| 6623 | renderbuffers_base = (GLuint *) |
| 6624 | _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0); |
| 6625 | renderbuffers = renderbuffers_base + offset; |
| 6626 | |
| 6627 | glGenRenderbuffersOES( |
| 6628 | (GLint)n, |
| 6629 | (GLuint *)renderbuffers |
| 6630 | ); |
| 6631 | |
| 6632 | exit: |
| 6633 | if (renderbuffers_base) { |
| 6634 | _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, |
| 6635 | _exception ? JNI_ABORT: 0); |
| 6636 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6637 | } |
| 6638 | |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6639 | /* void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6640 | static void |
| 6641 | android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 |
| 6642 | (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6643 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6644 | _env->ThrowNew(UOEClass, |
| 6645 | "glGenRenderbuffersOES"); |
| 6646 | return; |
| 6647 | } |
| 6648 | jint _exception = 0; |
| 6649 | jarray _array = (jarray) 0; |
| 6650 | jint _remaining; |
| 6651 | GLuint *renderbuffers = (GLuint *) 0; |
| 6652 | |
| 6653 | renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining); |
| 6654 | if (_remaining < n) { |
| 6655 | _exception = 1; |
| 6656 | _env->ThrowNew(IAEClass, "remaining() < n"); |
| 6657 | goto exit; |
| 6658 | } |
| 6659 | glGenRenderbuffersOES( |
| 6660 | (GLint)n, |
| 6661 | (GLuint *)renderbuffers |
| 6662 | ); |
| 6663 | |
| 6664 | exit: |
| 6665 | if (_array) { |
| 6666 | releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE); |
| 6667 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6668 | } |
| 6669 | |
| 6670 | /* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */ |
| 6671 | static void |
| 6672 | android_glGetFramebufferAttachmentParameterivOES__III_3II |
| 6673 | (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6674 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6675 | _env->ThrowNew(UOEClass, |
| 6676 | "glGetFramebufferAttachmentParameterivOES"); |
| 6677 | return; |
| 6678 | } |
| 6679 | jint _exception = 0; |
| 6680 | GLint *params_base = (GLint *) 0; |
| 6681 | jint _remaining; |
| 6682 | GLint *params = (GLint *) 0; |
| 6683 | |
| 6684 | if (!params_ref) { |
| 6685 | _exception = 1; |
| 6686 | _env->ThrowNew(IAEClass, "params == null"); |
| 6687 | goto exit; |
| 6688 | } |
| 6689 | if (offset < 0) { |
| 6690 | _exception = 1; |
| 6691 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6692 | goto exit; |
| 6693 | } |
| 6694 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 6695 | params_base = (GLint *) |
| 6696 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 6697 | params = params_base + offset; |
| 6698 | |
| 6699 | glGetFramebufferAttachmentParameterivOES( |
| 6700 | (GLint)target, |
| 6701 | (GLint)attachment, |
| 6702 | (GLint)pname, |
| 6703 | (GLint *)params |
| 6704 | ); |
| 6705 | |
| 6706 | exit: |
| 6707 | if (params_base) { |
| 6708 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 6709 | _exception ? JNI_ABORT: 0); |
| 6710 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6711 | } |
| 6712 | |
| 6713 | /* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */ |
| 6714 | static void |
| 6715 | android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 |
| 6716 | (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6717 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6718 | _env->ThrowNew(UOEClass, |
| 6719 | "glGetFramebufferAttachmentParameterivOES"); |
| 6720 | return; |
| 6721 | } |
| 6722 | jint _exception = 0; |
| 6723 | jarray _array = (jarray) 0; |
| 6724 | jint _remaining; |
| 6725 | GLint *params = (GLint *) 0; |
| 6726 | |
| 6727 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 6728 | glGetFramebufferAttachmentParameterivOES( |
| 6729 | (GLint)target, |
| 6730 | (GLint)attachment, |
| 6731 | (GLint)pname, |
| 6732 | (GLint *)params |
| 6733 | ); |
| 6734 | if (_array) { |
| 6735 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 6736 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6737 | } |
| 6738 | |
| 6739 | /* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */ |
| 6740 | static void |
| 6741 | android_glGetRenderbufferParameterivOES__II_3II |
| 6742 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6743 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6744 | _env->ThrowNew(UOEClass, |
| 6745 | "glGetRenderbufferParameterivOES"); |
| 6746 | return; |
| 6747 | } |
| 6748 | jint _exception = 0; |
| 6749 | GLint *params_base = (GLint *) 0; |
| 6750 | jint _remaining; |
| 6751 | GLint *params = (GLint *) 0; |
| 6752 | |
| 6753 | if (!params_ref) { |
| 6754 | _exception = 1; |
| 6755 | _env->ThrowNew(IAEClass, "params == null"); |
| 6756 | goto exit; |
| 6757 | } |
| 6758 | if (offset < 0) { |
| 6759 | _exception = 1; |
| 6760 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6761 | goto exit; |
| 6762 | } |
| 6763 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 6764 | params_base = (GLint *) |
| 6765 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 6766 | params = params_base + offset; |
| 6767 | |
| 6768 | glGetRenderbufferParameterivOES( |
| 6769 | (GLint)target, |
| 6770 | (GLint)pname, |
| 6771 | (GLint *)params |
| 6772 | ); |
| 6773 | |
| 6774 | exit: |
| 6775 | if (params_base) { |
| 6776 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 6777 | _exception ? JNI_ABORT: 0); |
| 6778 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6779 | } |
| 6780 | |
| 6781 | /* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */ |
| 6782 | static void |
| 6783 | android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 |
| 6784 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6785 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 6786 | _env->ThrowNew(UOEClass, |
| 6787 | "glGetRenderbufferParameterivOES"); |
| 6788 | return; |
| 6789 | } |
| 6790 | jint _exception = 0; |
| 6791 | jarray _array = (jarray) 0; |
| 6792 | jint _remaining; |
| 6793 | GLint *params = (GLint *) 0; |
| 6794 | |
| 6795 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 6796 | glGetRenderbufferParameterivOES( |
| 6797 | (GLint)target, |
| 6798 | (GLint)pname, |
| 6799 | (GLint *)params |
| 6800 | ); |
| 6801 | if (_array) { |
| 6802 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 6803 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6804 | } |
| 6805 | |
| 6806 | /* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */ |
| 6807 | static void |
| 6808 | android_glGetTexGenfv__II_3FI |
| 6809 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6810 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 6811 | _env->ThrowNew(UOEClass, |
| 6812 | "glGetTexGenfv"); |
| 6813 | return; |
| 6814 | } |
| 6815 | jint _exception = 0; |
| 6816 | GLfloat *params_base = (GLfloat *) 0; |
| 6817 | jint _remaining; |
| 6818 | GLfloat *params = (GLfloat *) 0; |
| 6819 | |
| 6820 | if (!params_ref) { |
| 6821 | _exception = 1; |
| 6822 | _env->ThrowNew(IAEClass, "params == null"); |
| 6823 | goto exit; |
| 6824 | } |
| 6825 | if (offset < 0) { |
| 6826 | _exception = 1; |
| 6827 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6828 | goto exit; |
| 6829 | } |
| 6830 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 6831 | params_base = (GLfloat *) |
| 6832 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 6833 | params = params_base + offset; |
| 6834 | |
| 6835 | glGetTexGenfv( |
| 6836 | (GLint)coord, |
| 6837 | (GLint)pname, |
| 6838 | (GLfloat *)params |
| 6839 | ); |
| 6840 | |
| 6841 | exit: |
| 6842 | if (params_base) { |
| 6843 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 6844 | _exception ? JNI_ABORT: 0); |
| 6845 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6846 | } |
| 6847 | |
| 6848 | /* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */ |
| 6849 | static void |
| 6850 | android_glGetTexGenfv__IILjava_nio_FloatBuffer_2 |
| 6851 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6852 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 6853 | _env->ThrowNew(UOEClass, |
| 6854 | "glGetTexGenfv"); |
| 6855 | return; |
| 6856 | } |
| 6857 | jint _exception = 0; |
| 6858 | jarray _array = (jarray) 0; |
| 6859 | jint _remaining; |
| 6860 | GLfloat *params = (GLfloat *) 0; |
| 6861 | |
| 6862 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 6863 | glGetTexGenfv( |
| 6864 | (GLint)coord, |
| 6865 | (GLint)pname, |
| 6866 | (GLfloat *)params |
| 6867 | ); |
| 6868 | if (_array) { |
| 6869 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 6870 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6871 | } |
| 6872 | |
| 6873 | /* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */ |
| 6874 | static void |
| 6875 | android_glGetTexGeniv__II_3II |
| 6876 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6877 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 6878 | _env->ThrowNew(UOEClass, |
| 6879 | "glGetTexGeniv"); |
| 6880 | return; |
| 6881 | } |
| 6882 | jint _exception = 0; |
| 6883 | GLint *params_base = (GLint *) 0; |
| 6884 | jint _remaining; |
| 6885 | GLint *params = (GLint *) 0; |
| 6886 | |
| 6887 | if (!params_ref) { |
| 6888 | _exception = 1; |
| 6889 | _env->ThrowNew(IAEClass, "params == null"); |
| 6890 | goto exit; |
| 6891 | } |
| 6892 | if (offset < 0) { |
| 6893 | _exception = 1; |
| 6894 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6895 | goto exit; |
| 6896 | } |
| 6897 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 6898 | params_base = (GLint *) |
| 6899 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 6900 | params = params_base + offset; |
| 6901 | |
| 6902 | glGetTexGeniv( |
| 6903 | (GLint)coord, |
| 6904 | (GLint)pname, |
| 6905 | (GLint *)params |
| 6906 | ); |
| 6907 | |
| 6908 | exit: |
| 6909 | if (params_base) { |
| 6910 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 6911 | _exception ? JNI_ABORT: 0); |
| 6912 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6913 | } |
| 6914 | |
| 6915 | /* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */ |
| 6916 | static void |
| 6917 | android_glGetTexGeniv__IILjava_nio_IntBuffer_2 |
| 6918 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6919 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 6920 | _env->ThrowNew(UOEClass, |
| 6921 | "glGetTexGeniv"); |
| 6922 | return; |
| 6923 | } |
| 6924 | jint _exception = 0; |
| 6925 | jarray _array = (jarray) 0; |
| 6926 | jint _remaining; |
| 6927 | GLint *params = (GLint *) 0; |
| 6928 | |
| 6929 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 6930 | glGetTexGeniv( |
| 6931 | (GLint)coord, |
| 6932 | (GLint)pname, |
| 6933 | (GLint *)params |
| 6934 | ); |
| 6935 | if (_array) { |
| 6936 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 6937 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6938 | } |
| 6939 | |
| 6940 | /* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */ |
| 6941 | static void |
| 6942 | android_glGetTexGenxv__II_3II |
| 6943 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6944 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 6945 | _env->ThrowNew(UOEClass, |
| 6946 | "glGetTexGenxv"); |
| 6947 | return; |
| 6948 | } |
| 6949 | jint _exception = 0; |
| 6950 | GLint *params_base = (GLint *) 0; |
| 6951 | jint _remaining; |
| 6952 | GLint *params = (GLint *) 0; |
| 6953 | |
| 6954 | if (!params_ref) { |
| 6955 | _exception = 1; |
| 6956 | _env->ThrowNew(IAEClass, "params == null"); |
| 6957 | goto exit; |
| 6958 | } |
| 6959 | if (offset < 0) { |
| 6960 | _exception = 1; |
| 6961 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 6962 | goto exit; |
| 6963 | } |
| 6964 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 6965 | params_base = (GLint *) |
| 6966 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 6967 | params = params_base + offset; |
| 6968 | |
| 6969 | glGetTexGenxv( |
| 6970 | (GLint)coord, |
| 6971 | (GLint)pname, |
| 6972 | (GLint *)params |
| 6973 | ); |
| 6974 | |
| 6975 | exit: |
| 6976 | if (params_base) { |
| 6977 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 6978 | _exception ? JNI_ABORT: 0); |
| 6979 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6980 | } |
| 6981 | |
| 6982 | /* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */ |
| 6983 | static void |
| 6984 | android_glGetTexGenxv__IILjava_nio_IntBuffer_2 |
| 6985 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 6986 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 6987 | _env->ThrowNew(UOEClass, |
| 6988 | "glGetTexGenxv"); |
| 6989 | return; |
| 6990 | } |
| 6991 | jint _exception = 0; |
| 6992 | jarray _array = (jarray) 0; |
| 6993 | jint _remaining; |
| 6994 | GLint *params = (GLint *) 0; |
| 6995 | |
| 6996 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 6997 | glGetTexGenxv( |
| 6998 | (GLint)coord, |
| 6999 | (GLint)pname, |
| 7000 | (GLint *)params |
| 7001 | ); |
| 7002 | if (_array) { |
| 7003 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 7004 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7005 | } |
| 7006 | |
| 7007 | /* GLboolean glIsFramebufferOES ( GLint framebuffer ) */ |
| 7008 | static jboolean |
| 7009 | android_glIsFramebufferOES__I |
| 7010 | (JNIEnv *_env, jobject _this, jint framebuffer) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7011 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 7012 | _env->ThrowNew(UOEClass, |
| 7013 | "glIsFramebufferOES"); |
| 7014 | return JNI_FALSE; |
| 7015 | } |
| 7016 | GLboolean _returnValue = JNI_FALSE; |
| 7017 | _returnValue = glIsFramebufferOES( |
| 7018 | (GLint)framebuffer |
| 7019 | ); |
| 7020 | return _returnValue; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7021 | } |
| 7022 | |
| 7023 | /* GLboolean glIsRenderbufferOES ( GLint renderbuffer ) */ |
| 7024 | static jboolean |
| 7025 | android_glIsRenderbufferOES__I |
| 7026 | (JNIEnv *_env, jobject _this, jint renderbuffer) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7027 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 7028 | _env->ThrowNew(UOEClass, |
| 7029 | "glIsRenderbufferOES"); |
| 7030 | return JNI_FALSE; |
| 7031 | } |
| 7032 | GLboolean _returnValue = JNI_FALSE; |
| 7033 | _returnValue = glIsRenderbufferOES( |
| 7034 | (GLint)renderbuffer |
| 7035 | ); |
| 7036 | return _returnValue; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7037 | } |
| 7038 | |
| 7039 | /* void glRenderbufferStorageOES ( GLint target, GLint internalformat, GLint width, GLint height ) */ |
| 7040 | static void |
| 7041 | android_glRenderbufferStorageOES__IIII |
| 7042 | (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7043 | if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { |
| 7044 | _env->ThrowNew(UOEClass, |
| 7045 | "glRenderbufferStorageOES"); |
| 7046 | return; |
| 7047 | } |
| 7048 | glRenderbufferStorageOES( |
| 7049 | (GLint)target, |
| 7050 | (GLint)internalformat, |
| 7051 | (GLint)width, |
| 7052 | (GLint)height |
| 7053 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7054 | } |
| 7055 | |
| 7056 | /* void glTexGenf ( GLint coord, GLint pname, GLfloat param ) */ |
| 7057 | static void |
| 7058 | android_glTexGenf__IIF |
| 7059 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7060 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 7061 | _env->ThrowNew(UOEClass, |
| 7062 | "glTexGenf"); |
| 7063 | return; |
| 7064 | } |
| 7065 | glTexGenf( |
| 7066 | (GLint)coord, |
| 7067 | (GLint)pname, |
| 7068 | (GLfloat)param |
| 7069 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7070 | } |
| 7071 | |
| 7072 | /* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */ |
| 7073 | static void |
| 7074 | android_glTexGenfv__II_3FI |
| 7075 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7076 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 7077 | _env->ThrowNew(UOEClass, |
| 7078 | "glTexGenfv"); |
| 7079 | return; |
| 7080 | } |
| 7081 | jint _exception = 0; |
| 7082 | GLfloat *params_base = (GLfloat *) 0; |
| 7083 | jint _remaining; |
| 7084 | GLfloat *params = (GLfloat *) 0; |
| 7085 | |
| 7086 | if (!params_ref) { |
| 7087 | _exception = 1; |
| 7088 | _env->ThrowNew(IAEClass, "params == null"); |
| 7089 | goto exit; |
| 7090 | } |
| 7091 | if (offset < 0) { |
| 7092 | _exception = 1; |
| 7093 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 7094 | goto exit; |
| 7095 | } |
| 7096 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 7097 | params_base = (GLfloat *) |
| 7098 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 7099 | params = params_base + offset; |
| 7100 | |
| 7101 | glTexGenfv( |
| 7102 | (GLint)coord, |
| 7103 | (GLint)pname, |
| 7104 | (GLfloat *)params |
| 7105 | ); |
| 7106 | |
| 7107 | exit: |
| 7108 | if (params_base) { |
| 7109 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 7110 | _exception ? JNI_ABORT: 0); |
| 7111 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7112 | } |
| 7113 | |
| 7114 | /* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */ |
| 7115 | static void |
| 7116 | android_glTexGenfv__IILjava_nio_FloatBuffer_2 |
| 7117 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7118 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 7119 | _env->ThrowNew(UOEClass, |
| 7120 | "glTexGenfv"); |
| 7121 | return; |
| 7122 | } |
| 7123 | jint _exception = 0; |
| 7124 | jarray _array = (jarray) 0; |
| 7125 | jint _remaining; |
| 7126 | GLfloat *params = (GLfloat *) 0; |
| 7127 | |
| 7128 | params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); |
| 7129 | glTexGenfv( |
| 7130 | (GLint)coord, |
| 7131 | (GLint)pname, |
| 7132 | (GLfloat *)params |
| 7133 | ); |
| 7134 | if (_array) { |
| 7135 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 7136 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7137 | } |
| 7138 | |
| 7139 | /* void glTexGeni ( GLint coord, GLint pname, GLint param ) */ |
| 7140 | static void |
| 7141 | android_glTexGeni__III |
| 7142 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7143 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 7144 | _env->ThrowNew(UOEClass, |
| 7145 | "glTexGeni"); |
| 7146 | return; |
| 7147 | } |
| 7148 | glTexGeni( |
| 7149 | (GLint)coord, |
| 7150 | (GLint)pname, |
| 7151 | (GLint)param |
| 7152 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7153 | } |
| 7154 | |
| 7155 | /* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */ |
| 7156 | static void |
| 7157 | android_glTexGeniv__II_3II |
| 7158 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7159 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 7160 | _env->ThrowNew(UOEClass, |
| 7161 | "glTexGeniv"); |
| 7162 | return; |
| 7163 | } |
| 7164 | jint _exception = 0; |
| 7165 | GLint *params_base = (GLint *) 0; |
| 7166 | jint _remaining; |
| 7167 | GLint *params = (GLint *) 0; |
| 7168 | |
| 7169 | if (!params_ref) { |
| 7170 | _exception = 1; |
| 7171 | _env->ThrowNew(IAEClass, "params == null"); |
| 7172 | goto exit; |
| 7173 | } |
| 7174 | if (offset < 0) { |
| 7175 | _exception = 1; |
| 7176 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 7177 | goto exit; |
| 7178 | } |
| 7179 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 7180 | params_base = (GLint *) |
| 7181 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 7182 | params = params_base + offset; |
| 7183 | |
| 7184 | glTexGeniv( |
| 7185 | (GLint)coord, |
| 7186 | (GLint)pname, |
| 7187 | (GLint *)params |
| 7188 | ); |
| 7189 | |
| 7190 | exit: |
| 7191 | if (params_base) { |
| 7192 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 7193 | _exception ? JNI_ABORT: 0); |
| 7194 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7195 | } |
| 7196 | |
| 7197 | /* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */ |
| 7198 | static void |
| 7199 | android_glTexGeniv__IILjava_nio_IntBuffer_2 |
| 7200 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7201 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 7202 | _env->ThrowNew(UOEClass, |
| 7203 | "glTexGeniv"); |
| 7204 | return; |
| 7205 | } |
| 7206 | jint _exception = 0; |
| 7207 | jarray _array = (jarray) 0; |
| 7208 | jint _remaining; |
| 7209 | GLint *params = (GLint *) 0; |
| 7210 | |
| 7211 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 7212 | glTexGeniv( |
| 7213 | (GLint)coord, |
| 7214 | (GLint)pname, |
| 7215 | (GLint *)params |
| 7216 | ); |
| 7217 | if (_array) { |
| 7218 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 7219 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7220 | } |
| 7221 | |
| 7222 | /* void glTexGenx ( GLint coord, GLint pname, GLint param ) */ |
| 7223 | static void |
| 7224 | android_glTexGenx__III |
| 7225 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7226 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 7227 | _env->ThrowNew(UOEClass, |
| 7228 | "glTexGenx"); |
| 7229 | return; |
| 7230 | } |
| 7231 | glTexGenx( |
| 7232 | (GLint)coord, |
| 7233 | (GLint)pname, |
| 7234 | (GLint)param |
| 7235 | ); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7236 | } |
| 7237 | |
| 7238 | /* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */ |
| 7239 | static void |
| 7240 | android_glTexGenxv__II_3II |
| 7241 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7242 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 7243 | _env->ThrowNew(UOEClass, |
| 7244 | "glTexGenxv"); |
| 7245 | return; |
| 7246 | } |
| 7247 | jint _exception = 0; |
| 7248 | GLint *params_base = (GLint *) 0; |
| 7249 | jint _remaining; |
| 7250 | GLint *params = (GLint *) 0; |
| 7251 | |
| 7252 | if (!params_ref) { |
| 7253 | _exception = 1; |
| 7254 | _env->ThrowNew(IAEClass, "params == null"); |
| 7255 | goto exit; |
| 7256 | } |
| 7257 | if (offset < 0) { |
| 7258 | _exception = 1; |
| 7259 | _env->ThrowNew(IAEClass, "offset < 0"); |
| 7260 | goto exit; |
| 7261 | } |
| 7262 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 7263 | params_base = (GLint *) |
| 7264 | _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); |
| 7265 | params = params_base + offset; |
| 7266 | |
| 7267 | glTexGenxv( |
| 7268 | (GLint)coord, |
| 7269 | (GLint)pname, |
| 7270 | (GLint *)params |
| 7271 | ); |
| 7272 | |
| 7273 | exit: |
| 7274 | if (params_base) { |
| 7275 | _env->ReleasePrimitiveArrayCritical(params_ref, params_base, |
| 7276 | _exception ? JNI_ABORT: 0); |
| 7277 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7278 | } |
| 7279 | |
| 7280 | /* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */ |
| 7281 | static void |
| 7282 | android_glTexGenxv__IILjava_nio_IntBuffer_2 |
| 7283 | (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { |
Jack Palevich | 8a4de4b | 2010-01-28 20:28:32 +0800 | [diff] [blame] | 7284 | if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) { |
| 7285 | _env->ThrowNew(UOEClass, |
| 7286 | "glTexGenxv"); |
| 7287 | return; |
| 7288 | } |
| 7289 | jint _exception = 0; |
| 7290 | jarray _array = (jarray) 0; |
| 7291 | jint _remaining; |
| 7292 | GLint *params = (GLint *) 0; |
| 7293 | |
| 7294 | params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); |
| 7295 | glTexGenxv( |
| 7296 | (GLint)coord, |
| 7297 | (GLint)pname, |
| 7298 | (GLint *)params |
| 7299 | ); |
| 7300 | if (_array) { |
| 7301 | releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); |
| 7302 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7303 | } |
| 7304 | |
| 7305 | static const char *classPathName = "com/google/android/gles_jni/GLImpl"; |
| 7306 | |
| 7307 | static JNINativeMethod methods[] = { |
| 7308 | {"_nativeClassInit", "()V", (void*)nativeClassInit }, |
| 7309 | {"glActiveTexture", "(I)V", (void *) android_glActiveTexture__I }, |
| 7310 | {"glAlphaFunc", "(IF)V", (void *) android_glAlphaFunc__IF }, |
| 7311 | {"glAlphaFuncx", "(II)V", (void *) android_glAlphaFuncx__II }, |
| 7312 | {"glBindTexture", "(II)V", (void *) android_glBindTexture__II }, |
| 7313 | {"glBlendFunc", "(II)V", (void *) android_glBlendFunc__II }, |
| 7314 | {"glClear", "(I)V", (void *) android_glClear__I }, |
| 7315 | {"glClearColor", "(FFFF)V", (void *) android_glClearColor__FFFF }, |
| 7316 | {"glClearColorx", "(IIII)V", (void *) android_glClearColorx__IIII }, |
| 7317 | {"glClearDepthf", "(F)V", (void *) android_glClearDepthf__F }, |
| 7318 | {"glClearDepthx", "(I)V", (void *) android_glClearDepthx__I }, |
| 7319 | {"glClearStencil", "(I)V", (void *) android_glClearStencil__I }, |
| 7320 | {"glClientActiveTexture", "(I)V", (void *) android_glClientActiveTexture__I }, |
| 7321 | {"glColor4f", "(FFFF)V", (void *) android_glColor4f__FFFF }, |
| 7322 | {"glColor4x", "(IIII)V", (void *) android_glColor4x__IIII }, |
| 7323 | {"glColorMask", "(ZZZZ)V", (void *) android_glColorMask__ZZZZ }, |
| 7324 | {"glColorPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glColorPointerBounds__IIILjava_nio_Buffer_2I }, |
| 7325 | {"glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 }, |
| 7326 | {"glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 }, |
| 7327 | {"glCopyTexImage2D", "(IIIIIIII)V", (void *) android_glCopyTexImage2D__IIIIIIII }, |
| 7328 | {"glCopyTexSubImage2D", "(IIIIIIII)V", (void *) android_glCopyTexSubImage2D__IIIIIIII }, |
| 7329 | {"glCullFace", "(I)V", (void *) android_glCullFace__I }, |
| 7330 | {"glDeleteTextures", "(I[II)V", (void *) android_glDeleteTextures__I_3II }, |
| 7331 | {"glDeleteTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTextures__ILjava_nio_IntBuffer_2 }, |
| 7332 | {"glDepthFunc", "(I)V", (void *) android_glDepthFunc__I }, |
| 7333 | {"glDepthMask", "(Z)V", (void *) android_glDepthMask__Z }, |
| 7334 | {"glDepthRangef", "(FF)V", (void *) android_glDepthRangef__FF }, |
| 7335 | {"glDepthRangex", "(II)V", (void *) android_glDepthRangex__II }, |
| 7336 | {"glDisable", "(I)V", (void *) android_glDisable__I }, |
| 7337 | {"glDisableClientState", "(I)V", (void *) android_glDisableClientState__I }, |
| 7338 | {"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III }, |
| 7339 | {"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 }, |
| 7340 | {"glEnable", "(I)V", (void *) android_glEnable__I }, |
| 7341 | {"glEnableClientState", "(I)V", (void *) android_glEnableClientState__I }, |
| 7342 | {"glFinish", "()V", (void *) android_glFinish__ }, |
| 7343 | {"glFlush", "()V", (void *) android_glFlush__ }, |
| 7344 | {"glFogf", "(IF)V", (void *) android_glFogf__IF }, |
| 7345 | {"glFogfv", "(I[FI)V", (void *) android_glFogfv__I_3FI }, |
| 7346 | {"glFogfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glFogfv__ILjava_nio_FloatBuffer_2 }, |
| 7347 | {"glFogx", "(II)V", (void *) android_glFogx__II }, |
| 7348 | {"glFogxv", "(I[II)V", (void *) android_glFogxv__I_3II }, |
| 7349 | {"glFogxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxv__ILjava_nio_IntBuffer_2 }, |
| 7350 | {"glFrontFace", "(I)V", (void *) android_glFrontFace__I }, |
| 7351 | {"glFrustumf", "(FFFFFF)V", (void *) android_glFrustumf__FFFFFF }, |
| 7352 | {"glFrustumx", "(IIIIII)V", (void *) android_glFrustumx__IIIIII }, |
| 7353 | {"glGenTextures", "(I[II)V", (void *) android_glGenTextures__I_3II }, |
| 7354 | {"glGenTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTextures__ILjava_nio_IntBuffer_2 }, |
| 7355 | {"glGetError", "()I", (void *) android_glGetError__ }, |
| 7356 | {"glGetIntegerv", "(I[II)V", (void *) android_glGetIntegerv__I_3II }, |
| 7357 | {"glGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetIntegerv__ILjava_nio_IntBuffer_2 }, |
| 7358 | {"_glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString }, |
| 7359 | {"glHint", "(II)V", (void *) android_glHint__II }, |
| 7360 | {"glLightModelf", "(IF)V", (void *) android_glLightModelf__IF }, |
| 7361 | {"glLightModelfv", "(I[FI)V", (void *) android_glLightModelfv__I_3FI }, |
| 7362 | {"glLightModelfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glLightModelfv__ILjava_nio_FloatBuffer_2 }, |
| 7363 | {"glLightModelx", "(II)V", (void *) android_glLightModelx__II }, |
| 7364 | {"glLightModelxv", "(I[II)V", (void *) android_glLightModelxv__I_3II }, |
| 7365 | {"glLightModelxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxv__ILjava_nio_IntBuffer_2 }, |
| 7366 | {"glLightf", "(IIF)V", (void *) android_glLightf__IIF }, |
| 7367 | {"glLightfv", "(II[FI)V", (void *) android_glLightfv__II_3FI }, |
| 7368 | {"glLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glLightfv__IILjava_nio_FloatBuffer_2 }, |
| 7369 | {"glLightx", "(III)V", (void *) android_glLightx__III }, |
| 7370 | {"glLightxv", "(II[II)V", (void *) android_glLightxv__II_3II }, |
| 7371 | {"glLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxv__IILjava_nio_IntBuffer_2 }, |
| 7372 | {"glLineWidth", "(F)V", (void *) android_glLineWidth__F }, |
| 7373 | {"glLineWidthx", "(I)V", (void *) android_glLineWidthx__I }, |
| 7374 | {"glLoadIdentity", "()V", (void *) android_glLoadIdentity__ }, |
| 7375 | {"glLoadMatrixf", "([FI)V", (void *) android_glLoadMatrixf___3FI }, |
| 7376 | {"glLoadMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glLoadMatrixf__Ljava_nio_FloatBuffer_2 }, |
| 7377 | {"glLoadMatrixx", "([II)V", (void *) android_glLoadMatrixx___3II }, |
| 7378 | {"glLoadMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixx__Ljava_nio_IntBuffer_2 }, |
| 7379 | {"glLogicOp", "(I)V", (void *) android_glLogicOp__I }, |
| 7380 | {"glMaterialf", "(IIF)V", (void *) android_glMaterialf__IIF }, |
| 7381 | {"glMaterialfv", "(II[FI)V", (void *) android_glMaterialfv__II_3FI }, |
| 7382 | {"glMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glMaterialfv__IILjava_nio_FloatBuffer_2 }, |
| 7383 | {"glMaterialx", "(III)V", (void *) android_glMaterialx__III }, |
| 7384 | {"glMaterialxv", "(II[II)V", (void *) android_glMaterialxv__II_3II }, |
| 7385 | {"glMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxv__IILjava_nio_IntBuffer_2 }, |
| 7386 | {"glMatrixMode", "(I)V", (void *) android_glMatrixMode__I }, |
| 7387 | {"glMultMatrixf", "([FI)V", (void *) android_glMultMatrixf___3FI }, |
| 7388 | {"glMultMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glMultMatrixf__Ljava_nio_FloatBuffer_2 }, |
| 7389 | {"glMultMatrixx", "([II)V", (void *) android_glMultMatrixx___3II }, |
| 7390 | {"glMultMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixx__Ljava_nio_IntBuffer_2 }, |
| 7391 | {"glMultiTexCoord4f", "(IFFFF)V", (void *) android_glMultiTexCoord4f__IFFFF }, |
| 7392 | {"glMultiTexCoord4x", "(IIIII)V", (void *) android_glMultiTexCoord4x__IIIII }, |
| 7393 | {"glNormal3f", "(FFF)V", (void *) android_glNormal3f__FFF }, |
| 7394 | {"glNormal3x", "(III)V", (void *) android_glNormal3x__III }, |
| 7395 | {"glNormalPointerBounds", "(IILjava/nio/Buffer;I)V", (void *) android_glNormalPointerBounds__IILjava_nio_Buffer_2I }, |
| 7396 | {"glOrthof", "(FFFFFF)V", (void *) android_glOrthof__FFFFFF }, |
| 7397 | {"glOrthox", "(IIIIII)V", (void *) android_glOrthox__IIIIII }, |
| 7398 | {"glPixelStorei", "(II)V", (void *) android_glPixelStorei__II }, |
| 7399 | {"glPointSize", "(F)V", (void *) android_glPointSize__F }, |
| 7400 | {"glPointSizex", "(I)V", (void *) android_glPointSizex__I }, |
| 7401 | {"glPolygonOffset", "(FF)V", (void *) android_glPolygonOffset__FF }, |
| 7402 | {"glPolygonOffsetx", "(II)V", (void *) android_glPolygonOffsetx__II }, |
| 7403 | {"glPopMatrix", "()V", (void *) android_glPopMatrix__ }, |
| 7404 | {"glPushMatrix", "()V", (void *) android_glPushMatrix__ }, |
| 7405 | {"glReadPixels", "(IIIIIILjava/nio/Buffer;)V", (void *) android_glReadPixels__IIIIIILjava_nio_Buffer_2 }, |
| 7406 | {"glRotatef", "(FFFF)V", (void *) android_glRotatef__FFFF }, |
| 7407 | {"glRotatex", "(IIII)V", (void *) android_glRotatex__IIII }, |
| 7408 | {"glSampleCoverage", "(FZ)V", (void *) android_glSampleCoverage__FZ }, |
| 7409 | {"glSampleCoveragex", "(IZ)V", (void *) android_glSampleCoveragex__IZ }, |
| 7410 | {"glScalef", "(FFF)V", (void *) android_glScalef__FFF }, |
| 7411 | {"glScalex", "(III)V", (void *) android_glScalex__III }, |
| 7412 | {"glScissor", "(IIII)V", (void *) android_glScissor__IIII }, |
| 7413 | {"glShadeModel", "(I)V", (void *) android_glShadeModel__I }, |
| 7414 | {"glStencilFunc", "(III)V", (void *) android_glStencilFunc__III }, |
| 7415 | {"glStencilMask", "(I)V", (void *) android_glStencilMask__I }, |
| 7416 | {"glStencilOp", "(III)V", (void *) android_glStencilOp__III }, |
| 7417 | {"glTexCoordPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I }, |
| 7418 | {"glTexEnvf", "(IIF)V", (void *) android_glTexEnvf__IIF }, |
| 7419 | {"glTexEnvfv", "(II[FI)V", (void *) android_glTexEnvfv__II_3FI }, |
| 7420 | {"glTexEnvfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexEnvfv__IILjava_nio_FloatBuffer_2 }, |
| 7421 | {"glTexEnvx", "(III)V", (void *) android_glTexEnvx__III }, |
| 7422 | {"glTexEnvxv", "(II[II)V", (void *) android_glTexEnvxv__II_3II }, |
| 7423 | {"glTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxv__IILjava_nio_IntBuffer_2 }, |
| 7424 | {"glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 }, |
| 7425 | {"glTexParameterf", "(IIF)V", (void *) android_glTexParameterf__IIF }, |
| 7426 | {"glTexParameterx", "(III)V", (void *) android_glTexParameterx__III }, |
| 7427 | {"glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 }, |
| 7428 | {"glTranslatef", "(FFF)V", (void *) android_glTranslatef__FFF }, |
| 7429 | {"glTranslatex", "(III)V", (void *) android_glTranslatex__III }, |
| 7430 | {"glVertexPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glVertexPointerBounds__IIILjava_nio_Buffer_2I }, |
| 7431 | {"glViewport", "(IIII)V", (void *) android_glViewport__IIII }, |
| 7432 | {"glQueryMatrixxOES", "([II[II)I", (void *) android_glQueryMatrixxOES___3II_3II }, |
| 7433 | {"glQueryMatrixxOES", "(Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)I", (void *) android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 }, |
| 7434 | {"glBindBuffer", "(II)V", (void *) android_glBindBuffer__II }, |
| 7435 | {"glBufferData", "(IILjava/nio/Buffer;I)V", (void *) android_glBufferData__IILjava_nio_Buffer_2I }, |
| 7436 | {"glBufferSubData", "(IIILjava/nio/Buffer;)V", (void *) android_glBufferSubData__IIILjava_nio_Buffer_2 }, |
| 7437 | {"glClipPlanef", "(I[FI)V", (void *) android_glClipPlanef__I_3FI }, |
| 7438 | {"glClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanef__ILjava_nio_FloatBuffer_2 }, |
| 7439 | {"glClipPlanex", "(I[II)V", (void *) android_glClipPlanex__I_3II }, |
| 7440 | {"glClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanex__ILjava_nio_IntBuffer_2 }, |
| 7441 | {"glColor4ub", "(BBBB)V", (void *) android_glColor4ub__BBBB }, |
| 7442 | {"glColorPointer", "(IIII)V", (void *) android_glColorPointer__IIII }, |
| 7443 | {"glDeleteBuffers", "(I[II)V", (void *) android_glDeleteBuffers__I_3II }, |
| 7444 | {"glDeleteBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteBuffers__ILjava_nio_IntBuffer_2 }, |
| 7445 | {"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII }, |
| 7446 | {"glGenBuffers", "(I[II)V", (void *) android_glGenBuffers__I_3II }, |
| 7447 | {"glGenBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenBuffers__ILjava_nio_IntBuffer_2 }, |
| 7448 | {"glGetBooleanv", "(I[ZI)V", (void *) android_glGetBooleanv__I_3ZI }, |
| 7449 | {"glGetBooleanv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetBooleanv__ILjava_nio_IntBuffer_2 }, |
| 7450 | {"glGetBufferParameteriv", "(II[II)V", (void *) android_glGetBufferParameteriv__II_3II }, |
| 7451 | {"glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 }, |
| 7452 | {"glGetClipPlanef", "(I[FI)V", (void *) android_glGetClipPlanef__I_3FI }, |
| 7453 | {"glGetClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 }, |
| 7454 | {"glGetClipPlanex", "(I[II)V", (void *) android_glGetClipPlanex__I_3II }, |
| 7455 | {"glGetClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanex__ILjava_nio_IntBuffer_2 }, |
| 7456 | {"glGetFixedv", "(I[II)V", (void *) android_glGetFixedv__I_3II }, |
| 7457 | {"glGetFixedv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedv__ILjava_nio_IntBuffer_2 }, |
| 7458 | {"glGetFloatv", "(I[FI)V", (void *) android_glGetFloatv__I_3FI }, |
| 7459 | {"glGetFloatv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetFloatv__ILjava_nio_FloatBuffer_2 }, |
| 7460 | {"glGetLightfv", "(II[FI)V", (void *) android_glGetLightfv__II_3FI }, |
| 7461 | {"glGetLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetLightfv__IILjava_nio_FloatBuffer_2 }, |
| 7462 | {"glGetLightxv", "(II[II)V", (void *) android_glGetLightxv__II_3II }, |
| 7463 | {"glGetLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxv__IILjava_nio_IntBuffer_2 }, |
| 7464 | {"glGetMaterialfv", "(II[FI)V", (void *) android_glGetMaterialfv__II_3FI }, |
| 7465 | {"glGetMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 }, |
| 7466 | {"glGetMaterialxv", "(II[II)V", (void *) android_glGetMaterialxv__II_3II }, |
| 7467 | {"glGetMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxv__IILjava_nio_IntBuffer_2 }, |
| 7468 | {"glGetTexEnviv", "(II[II)V", (void *) android_glGetTexEnviv__II_3II }, |
| 7469 | {"glGetTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnviv__IILjava_nio_IntBuffer_2 }, |
| 7470 | {"glGetTexEnvxv", "(II[II)V", (void *) android_glGetTexEnvxv__II_3II }, |
| 7471 | {"glGetTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 }, |
| 7472 | {"glGetTexParameterfv", "(II[FI)V", (void *) android_glGetTexParameterfv__II_3FI }, |
| 7473 | {"glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 }, |
| 7474 | {"glGetTexParameteriv", "(II[II)V", (void *) android_glGetTexParameteriv__II_3II }, |
| 7475 | {"glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 }, |
| 7476 | {"glGetTexParameterxv", "(II[II)V", (void *) android_glGetTexParameterxv__II_3II }, |
| 7477 | {"glGetTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 }, |
| 7478 | {"glIsBuffer", "(I)Z", (void *) android_glIsBuffer__I }, |
| 7479 | {"glIsEnabled", "(I)Z", (void *) android_glIsEnabled__I }, |
| 7480 | {"glIsTexture", "(I)Z", (void *) android_glIsTexture__I }, |
| 7481 | {"glNormalPointer", "(III)V", (void *) android_glNormalPointer__III }, |
| 7482 | {"glPointParameterf", "(IF)V", (void *) android_glPointParameterf__IF }, |
| 7483 | {"glPointParameterfv", "(I[FI)V", (void *) android_glPointParameterfv__I_3FI }, |
| 7484 | {"glPointParameterfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glPointParameterfv__ILjava_nio_FloatBuffer_2 }, |
| 7485 | {"glPointParameterx", "(II)V", (void *) android_glPointParameterx__II }, |
| 7486 | {"glPointParameterxv", "(I[II)V", (void *) android_glPointParameterxv__I_3II }, |
| 7487 | {"glPointParameterxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxv__ILjava_nio_IntBuffer_2 }, |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 7488 | {"glPointSizePointerOESBounds", "(IILjava/nio/Buffer;I)V", (void *) android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7489 | {"glTexCoordPointer", "(IIII)V", (void *) android_glTexCoordPointer__IIII }, |
| 7490 | {"glTexEnvi", "(III)V", (void *) android_glTexEnvi__III }, |
| 7491 | {"glTexEnviv", "(II[II)V", (void *) android_glTexEnviv__II_3II }, |
| 7492 | {"glTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnviv__IILjava_nio_IntBuffer_2 }, |
| 7493 | {"glTexParameterfv", "(II[FI)V", (void *) android_glTexParameterfv__II_3FI }, |
| 7494 | {"glTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexParameterfv__IILjava_nio_FloatBuffer_2 }, |
| 7495 | {"glTexParameteri", "(III)V", (void *) android_glTexParameteri__III }, |
| 7496 | {"glTexParameteriv", "(II[II)V", (void *) android_glTexParameteriv__II_3II }, |
| 7497 | {"glTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameteriv__IILjava_nio_IntBuffer_2 }, |
| 7498 | {"glTexParameterxv", "(II[II)V", (void *) android_glTexParameterxv__II_3II }, |
| 7499 | {"glTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxv__IILjava_nio_IntBuffer_2 }, |
| 7500 | {"glVertexPointer", "(IIII)V", (void *) android_glVertexPointer__IIII }, |
| 7501 | {"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I }, |
| 7502 | {"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF }, |
| 7503 | {"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI }, |
| 7504 | {"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 }, |
| 7505 | {"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII }, |
| 7506 | {"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II }, |
| 7507 | {"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 }, |
| 7508 | {"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS }, |
| 7509 | {"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI }, |
| 7510 | {"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 }, |
| 7511 | {"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII }, |
| 7512 | {"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II }, |
| 7513 | {"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 }, |
| 7514 | {"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ }, |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 7515 | {"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7516 | {"glMatrixIndexPointerOES", "(IIII)V", (void *) android_glMatrixIndexPointerOES__IIII }, |
Jack Palevich | be6eac8 | 2009-12-08 15:43:51 +0800 | [diff] [blame] | 7517 | {"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7518 | {"glWeightPointerOES", "(IIII)V", (void *) android_glWeightPointerOES__IIII }, |
| 7519 | {"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II }, |
| 7520 | {"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II }, |
| 7521 | {"glBlendEquation", "(I)V", (void *) android_glBlendEquation__I }, |
| 7522 | {"glBlendEquationSeparate", "(II)V", (void *) android_glBlendEquationSeparate__II }, |
| 7523 | {"glBlendFuncSeparate", "(IIII)V", (void *) android_glBlendFuncSeparate__IIII }, |
| 7524 | {"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I }, |
| 7525 | {"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II }, |
| 7526 | {"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 }, |
| 7527 | {"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II }, |
| 7528 | {"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 }, |
| 7529 | {"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII }, |
| 7530 | {"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII }, |
| 7531 | {"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I }, |
| 7532 | {"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II }, |
| 7533 | {"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 }, |
| 7534 | {"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II }, |
| 7535 | {"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 }, |
| 7536 | {"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II }, |
| 7537 | {"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 }, |
| 7538 | {"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II }, |
| 7539 | {"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 }, |
| 7540 | {"glGetTexGenfv", "(II[FI)V", (void *) android_glGetTexGenfv__II_3FI }, |
| 7541 | {"glGetTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfv__IILjava_nio_FloatBuffer_2 }, |
| 7542 | {"glGetTexGeniv", "(II[II)V", (void *) android_glGetTexGeniv__II_3II }, |
| 7543 | {"glGetTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGeniv__IILjava_nio_IntBuffer_2 }, |
| 7544 | {"glGetTexGenxv", "(II[II)V", (void *) android_glGetTexGenxv__II_3II }, |
| 7545 | {"glGetTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxv__IILjava_nio_IntBuffer_2 }, |
| 7546 | {"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I }, |
| 7547 | {"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I }, |
| 7548 | {"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII }, |
| 7549 | {"glTexGenf", "(IIF)V", (void *) android_glTexGenf__IIF }, |
| 7550 | {"glTexGenfv", "(II[FI)V", (void *) android_glTexGenfv__II_3FI }, |
| 7551 | {"glTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfv__IILjava_nio_FloatBuffer_2 }, |
| 7552 | {"glTexGeni", "(III)V", (void *) android_glTexGeni__III }, |
| 7553 | {"glTexGeniv", "(II[II)V", (void *) android_glTexGeniv__II_3II }, |
| 7554 | {"glTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGeniv__IILjava_nio_IntBuffer_2 }, |
| 7555 | {"glTexGenx", "(III)V", (void *) android_glTexGenx__III }, |
| 7556 | {"glTexGenxv", "(II[II)V", (void *) android_glTexGenxv__II_3II }, |
| 7557 | {"glTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxv__IILjava_nio_IntBuffer_2 }, |
| 7558 | }; |
| 7559 | |
| 7560 | int register_com_google_android_gles_jni_GLImpl(JNIEnv *_env) |
| 7561 | { |
| 7562 | int err; |
| 7563 | err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods)); |
| 7564 | return err; |
| 7565 | } |