1 /* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */ 2 static void 3 android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I 4 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount) { 5 jarray _array = (jarray) 0; 6 jint _bufferOffset = (jint) 0; 7 jint _remaining; 8 GLvoid *indices = (GLvoid *) 0; 9 10 indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset); 11 if (indices == NULL) { 12 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 13 indices = (GLvoid *) (_indicesBase + _bufferOffset); 14 } 15 glDrawElementsInstanced( 16 (GLenum)mode, 17 (GLsizei)count, 18 (GLenum)type, 19 (GLvoid *)indices, 20 (GLsizei)instanceCount 21 ); 22 if (_array) { 23 releasePointer(_env, _array, indices, JNI_FALSE); 24 } 25 } 26 27 /* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */ 28 static void 29 android_glDrawElementsInstanced__IIIII 30 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount) { 31 glDrawElementsInstanced( 32 (GLenum)mode, 33 (GLsizei)count, 34 (GLenum)type, 35 (GLvoid *)indicesOffset, 36 (GLsizei)instanceCount 37 ); 38 } 39 40