Browse Source

iOS: Fix crash in GLES Native Code due to changed Method Signatures

MeFisto94 9 years ago
parent
commit
8adeb88bd2
1 changed files with 2 additions and 5 deletions
  1. 2 5
      jme3-ios/ios-data/templates/src/JmeIosGLES.m

+ 2 - 5
jme3-ios/ios-data/templates/src/JmeIosGLES.m

@@ -1722,8 +1722,7 @@ Java_com_jme3_renderer_ios_JmeIosGLES_glVertexAttribPointer(JNIEnv* e, jobject c
 }
 }
 
 
 JNIEXPORT void JNICALL
 JNIEXPORT void JNICALL
-Java_com_jme3_renderer_ios_JmeIosGLES_glVertexAttribPointer2(JNIEnv* e, jobject c, jint indx, jint size, jint type, jboolean normalized, jint stride, jbyteArray ptr, jint offset) {
-	jbyte *ptrNative = (*e)->GetByteArrayElements(e, ptr, NULL);
+Java_com_jme3_renderer_ios_JmeIosGLES_glVertexAttribPointer2(JNIEnv* e, jclass c, jint indx, jint size, jint type, jboolean normalized, jint stride, jint offset) {
 	
 	
     glVertexAttribPointer(
     glVertexAttribPointer(
         (GLuint)indx,
         (GLuint)indx,
@@ -1731,10 +1730,8 @@ Java_com_jme3_renderer_ios_JmeIosGLES_glVertexAttribPointer2(JNIEnv* e, jobject
         (GLenum)type,
         (GLenum)type,
         (GLboolean)normalized,
         (GLboolean)normalized,
         (GLsizei)stride,
         (GLsizei)stride,
-        (GLvoid *)(ptrNative + offset)
+        (GLvoid *)(offset)
     );
     );
-	
-	(*e)->ReleaseByteArrayElements(e, ptr, ptrNative, 0);
 }
 }
 
 
 JNIEXPORT void JNICALL
 JNIEXPORT void JNICALL