Просмотр исходного кода

Merge pull request #423 from enkore/master

Fix some issues in jassimp
Alexander Gessler 10 лет назад
Родитель
Сommit
585e7c69fb

+ 6 - 1
port/jassimp/README

@@ -15,7 +15,12 @@ application examples using this wrapper
 How To Build
 ------------
 
- I) native library
+ I) native library, for example by issuing this command in jassimp-native/src:
+
+    $ gcc jassimp.cpp -I/usr/lib/jvm/default/include/ \
+      -I/usr/lib/jvm/default/include/linux -lassimp -shared -fPIC -o libjassimp.so
+
+    libjassimp.so is required at runtime and must be located in java.library.path.
 
 II) Java binding
     The java library is built using ant. Executing "ant" in the port/jassimp

+ 3 - 1
port/jassimp/jassimp-native/src/jassimp.cpp

@@ -1379,6 +1379,7 @@ JNIEXPORT jobject JNICALL Java_jassimp_Jassimp_aiImportFile
 	goto end;
 
 error:
+	{
 	jclass exception = env->FindClass("java/io/IOException");
 
 	if (NULL == exception)
@@ -1390,6 +1391,7 @@ error:
 	env->ThrowNew(exception, aiGetErrorString());
 
 	lprintf("problem detected\n");
+	}
 
 end:
 	/* 
@@ -1405,4 +1407,4 @@ end:
 	lprintf("return from native\n");
 
 	return jScene;
-}
+}

+ 0 - 2
port/jassimp/jassimp-native/src/jassimp.h

@@ -7,8 +7,6 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* Inaccessible static: BUILTIN */
-/* Inaccessible static: s_wrapperProvider */
 /*
  * Class:     jassimp_Jassimp
  * Method:    getErrorString

+ 3 - 3
port/jassimp/jassimp/src/jassimp/JaiDebug.java

@@ -67,7 +67,7 @@ public final class JaiDebug {
             return;
         }
         
-        for (int i = 0; i < mesh.getNumVertives(); i++) {
+        for (int i = 0; i < mesh.getNumVertices(); i++) {
             System.out.println("[" +
                     mesh.getPositionX(i) + ", " + 
                     mesh.getPositionY(i) + ", " + 
@@ -119,7 +119,7 @@ public final class JaiDebug {
             return;
         }
         
-        for (int i = 0; i < mesh.getNumVertives(); i++) {
+        for (int i = 0; i < mesh.getNumVertices(); i++) {
             System.out.println("[" + 
                     mesh.getColorR(i, colorset) + ", " + 
                     mesh.getColorG(i, colorset) + ", " + 
@@ -142,7 +142,7 @@ public final class JaiDebug {
             return;
         }
         
-        for (int i = 0; i < mesh.getNumVertives(); i++) {
+        for (int i = 0; i < mesh.getNumVertices(); i++) {
             int numComponents = mesh.getNumUVComponents(coords);
             System.out.print("[" + mesh.getTexCoordU(i, coords));