Momoko_Fan said:
Do we need some kind of special GCC version to compile for android? Perhaps we can add it to the build script
Yes, as said, would be awesome if somebody got it to work with the script. Same for all other missing platforms.
Momoko_Fan said:
Do we need some kind of special GCC version to compile for android? Perhaps we can add it to the build script
Hi.
I forgot to say an important thing.
The profiler of bullet physics is not thread safe on some platforms(Solaris, Linux etc.).
Please disable profiler.
LinearMath/btQuickprof.h
[java]
#ifndef QUICK_PROF_H
#define QUICK_PROF_H
//To disable built-in profiling, please comment out next line
#define BT_NO_PROFILE 1 // <
Android patch
[patch]
diff -r 05978cf01219 -r c7f8ca96d04c engine/src/bullet/native/com_jme3_bullet_objects_PhysicsGhostObject.cpp
ā a/engine/src/bullet/native/com_jme3_bullet_objects_PhysicsGhostObject.cpp Sun Oct 16 01:12:02 2011 +0900
+++ b/engine/src/bullet/native/com_jme3_bullet_objects_PhysicsGhostObject.cpp Mon Oct 17 23:58:18 2011 +0900
@@ -183,8 +183,9 @@
{
btCollisionObject *co1 = (btCollisionObject *)pair.m_pProxy0->m_clientObject;
jmeUserPointer up1 = (jmeUserPointer)co1 -> getUserPointer();
-
m_env->CallVoidMethod(m_object, jmeClasses::PhysicsGhostObject_addOverlappingObject, up1->javaCollisionObject);<br />
jobject javaCollisionObject1 = m_env->NewLocalRef(up1->javaCollisionObject);<br />
m_env->CallVoidMethod(m_object, jmeClasses::PhysicsGhostObject_addOverlappingObject, javaCollisionObject1);<br />
m_env->DeleteLocalRef(javaCollisionObject1);<br />
if (m_env->ExceptionCheck()) {
m_env->Throw(m_env->ExceptionOccurred());
return false;
diff -r 05978cf01219 -r c7f8ca96d04c engine/src/bullet/native/com_jme3_bullet_util_DebugShapeFactory.cpp
ā a/engine/src/bullet/native/com_jme3_bullet_util_DebugShapeFactory.cpp Sun Oct 16 01:12:02 2011 +0900
+++ b/engine/src/bullet/native/com_jme3_bullet_util_DebugShapeFactory.cpp Mon Oct 17 23:58:18 2011 +0900
@@ -90,8 +90,8 @@
(JNIEnv env, jclass clazz, jlong shapeId, jobject callback) {
btCollisionShape shape = (btCollisionShape*) shapeId;
if (shape->isConcave()) {
fprintf(stdout,"Concave shape");<br />
fflush(stdout);<br />
+// fprintf(stdout,"Concave shape");
+// fflush(stdout);
btConcaveShape* concave = (btConcaveShape*) shape;
DebugCallback* clb = new DebugCallback(env, callback);
btVector3 min = btVector3(-1e30, -1e30, -1e30);
@@ -99,8 +99,8 @@
concave->processAllTriangles(clb, min, max);
delete(clb);
} else if (shape->isConvex()) {
fprintf(stdout,"Convex shape");<br />
fflush(stdout);<br />
+// fprintf(stdout,"Convex shape");
+// fflush(stdout);
btConvexShape* convexShape = (btConvexShape*) shape;
// Check there is a hull shape to render
if (convexShape->getUserPointer() == NULL) {
diff -r 05978cf01219 -r c7f8ca96d04c engine/src/bullet/native/jmeClasses.cpp
ā a/engine/src/bullet/native/jmeClasses.cpp Sun Oct 16 01:12:02 2011 +0900
+++ b/engine/src/bullet/native/jmeClasses.cpp Mon Oct 17 23:58:18 2011 +0900
@@ -30,6 +30,7 @@
env->Throw(env->ExceptionOccurred());<br />
return;<br />
env->CallVoidMethod(javaPhysicsSpace, jmeClasses::PhysicsSpace_preTick, timeStep);<br />
env->DeleteLocalRef(javaPhysicsSpace);<br />
if (env->ExceptionCheck()) {<br />
env->Throw(env->ExceptionOccurred());<br />
return;<br />
}<br />
}
}
void jmePhysicsSpace::postTickCallback(btDynamicsWorld world, btScalar timeStep) {
jmePhysicsSpace dynamicsWorld = (jmePhysicsSpace*) world->getWorldUserInfo();
JNIEnv* env = dynamicsWorld->getEnv();
env->Throw(env->ExceptionOccurred());<br />
return;<br />
env->CallVoidMethod(javaPhysicsSpace, jmeClasses::PhysicsSpace_postTick, timeStep);<br />
env->DeleteLocalRef(javaPhysicsSpace);<br />
if (env->ExceptionCheck()) {<br />
env->Throw(env->ExceptionOccurred());<br />
return;<br />
}<br />
}
}
bool jmePhysicsSpace::contactProcessedCallback(btManifoldPoint &cp, void *body0, void *body1) {
@@ -229,10 +241,18 @@
jmePhysicsSpace dynamicsWorld = up0->space;
if (dynamicsWorld != NULL) {
JNIEnv env = dynamicsWorld->getEnv();
env->CallVoidMethod(dynamicsWorld->getJavaPhysicsSpace(), jmeClasses::PhysicsSpace_addCollisionEvent, up0->javaCollisionObject, up1->javaCollisionObject, (jlong)&cp);<br />
if (env->ExceptionCheck()) {<br />
env->Throw(env->ExceptionOccurred());<br />
return true;<br />
jobject javaPhysicsSpace = env->NewLocalRef(dynamicsWorld->getJavaPhysicsSpace());<br />
if (javaPhysicsSpace != NULL) {<br />
jobject javaCollisionObject0 = env->NewLocalRef(up0->javaCollisionObject);<br />
jobject javaCollisionObject1 = env->NewLocalRef(up1->javaCollisionObject);<br />
env->CallVoidMethod(javaPhysicsSpace, jmeClasses::PhysicsSpace_addCollisionEvent, javaCollisionObject0, javaCollisionObject1, (jlong)&cp);<br />
env->DeleteLocalRef(javaPhysicsSpace);<br />
env->DeleteLocalRef(javaCollisionObject0);<br />
env->DeleteLocalRef(javaCollisionObject1);<br />
if (env->ExceptionCheck()) {<br />
env->Throw(env->ExceptionOccurred());<br />
return true;<br />
}<br />
}
}
}
[/patch]
TestBoneRagdoll
ASUS Transformer TF101
Can you please make the patch towards the current jme3 version and not your own?
Nvm, added the changes anyway. Still Iād recommend doing the changes against the official version, this branching makes it much harder to track the changes, why did you branch it anyway :/.
Good morning.
why did you branch it anyway
Because Iām not a committer of jME.
I contributed many patches.
However, my patches were not received for a half year.
I cannot stop development of my projects so for a long time.
I couldnāt but make my branch of jME.
However, I donāt want to maintain my branch of jME.
Itās means and is not a purpose.
I stop development of my branch if official release of jME becomes perfect.
Having local changes in some code is normal, opening a public branch is something else. Anyway it was mainly about having the patches against the actual version I have to apply them to
Cool, what was it?
Pointer bug
Initialize sequence bug
I updated my repository on sourceforge.
Please see source.
can you post a patch against the official jme3 version?
Why rate down?
I was offended very much.
I think because a line like āplease see sourceā when you actually use the code of the person you address might seem a little careless given that you know how to use diff/patch and versioning systems.
I donāt post the patch because I posted android patch 3 days ago but you didnāt welcome it.
I thought that you welcomed my work. However, it was not so.
I donāt contribute to jME anymore if my work is not welcomed.
Uhm, @chototsu, all your patches have been applied by me to the jme3 svn, after tedious work because they were done against another version of the jme3 native bullet library⦠I compiled a windows, linux and mac version of the new libraries with all changes and I mentioned you in every commit. In this thread I asked you to make the patches against the svn version of jme3 and the next answer from you was ācheck my svn for the changesā.
We all (and I think I speak for the whole community here) appreciate very much what you do for the engine but you have to see that this is work for us too and the fact that you have the ability to make applying these fixes to the engine easier for us would help us more if it you executed it
OK I looked into the repo and after playing around a bit I see whats the issue now, your fixes are not done correctly though, so you donāt need to post a patch (no offense). I will fix this today in the jme3 svn.
all your patches have been applied by me to the jme3 svn
I know, it is big progress.
My repository and yours will be unified.
However, I was still working to fix other bugs on my repository.
It was difficult to merge it during work.
I succeeded in finally compile it on win64 some time ago.
I updated my repository.
P.S.
There is the patch more than 8,500 lines.
I donāt paste the patch because itās too big.
P.S.2
When I contribute and receive criticism, I am hurt very much.
You were receiving criticism for not contributing The change in casting you committed lately should not be necessary though, you should be able to solve that with some compiler flagā¦
Vehicle is now fixed in the jme3 svn as well. The change involves using the wheel index now for addressing the right wheel instead of a pointer to the wheelInfo object.
you should be able to solve that with some compiler flagā¦
Really!?
How can you do it?