Normand Briere
2019-05-02 c209bbe1cf788c9af3dcffea7667c830170a3f1f
GenericJoint.java
....@@ -330,12 +330,14 @@
330330 e.printStackTrace();
331331 }
332332
333
- display.GetGL().glPushMatrix();
333
+ //display.GetGL().glPushMatrix();
334
+ display.PushMatrix(LA.Identity, 1);
334335 Vector3f v = ragdolls.get(0).bodies[0].worldTransform.origin;
335336 // display.GetGL().glTranslatef(-v.x,0,-v.z);
336337
337338 super.DrawNode(display, root, selected);
338
- display.GetGL().glPopMatrix();
339
+ //display.GetGL().glPopMatrix();
340
+ display.PopMatrix(LA.Identity);
339341
340342 // assert(bRep != null);
341343
....@@ -453,7 +455,7 @@
453455
454456 public void renderme(iCameraPane display)
455457 {
456
- GL gl = display!=null?display.GetGL():null;
458
+ GL gl = display!=null?display.GetGL0():null;
457459
458460 // gl0 = gl;
459461 if (GetDynamicsWorld() != null)
....@@ -798,7 +800,7 @@
798800
799801 public void drawCube(iCameraPane display, float extent)
800802 {
801
- GL gl = display.GetGL();
803
+ GL gl = display.GetGL0();
802804
803805 extent = extent * 0.5f;
804806
....@@ -871,6 +873,7 @@
871873
872874 if (shape.getShapeType() == BroadphaseNativeType.COMPOUND_SHAPE_PROXYTYPE)
873875 {
876
+ new Exception().printStackTrace();
874877 System.exit(0);
875878 CompoundShape compoundShape = (CompoundShape) shape;
876879 Transform childTrans = transformsPool.get();
....@@ -901,6 +904,7 @@
901904 {
902905 case BOX_SHAPE_PROXYTYPE:
903906 {
907
+ new Exception().printStackTrace();
904908 System.exit(0);
905909 BoxShape boxShape = (BoxShape) shape;
906910 Vector3f halfExtent = boxShape.getHalfExtentsWithMargin(vectorsPool.get());
....@@ -912,6 +916,7 @@
912916 }
913917 case SPHERE_SHAPE_PROXYTYPE:
914918 {
919
+ new Exception().printStackTrace();
915920 System.exit(0);
916921 SphereShape sphereShape = (SphereShape) shape;
917922 float radius = sphereShape.getMargin(); // radius doesn't include the margin, so draw with margin
....@@ -958,6 +963,7 @@
958963
959964 case STATIC_PLANE_PROXYTYPE:
960965 {
966
+ new Exception().printStackTrace();
961967 System.exit(0);
962968 StaticPlaneShape staticPlaneShape = (StaticPlaneShape) shape;
963969 float planeConst = staticPlaneShape.getPlaneConstant();
....@@ -1004,6 +1010,7 @@
10041010
10051011 case CYLINDER_SHAPE_PROXYTYPE:
10061012 {
1013
+ new Exception().printStackTrace();
10071014 System.exit(0);
10081015 CylinderShape cylinder = (CylinderShape) shape;
10091016 int upAxis = cylinder.getUpAxis();
....@@ -1356,6 +1363,7 @@
13561363 // for polyhedral shapes
13571364 if (shape.isPolyhedral())
13581365 {
1366
+ new Exception().printStackTrace();
13591367 System.exit(0);
13601368 PolyhedralConvexShape polyshape = (PolyhedralConvexShape) shape;
13611369
....@@ -1425,6 +1433,7 @@
14251433 if (shape.isConcave())//>getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE||shape->getShapeType() == GIMPACT_SHAPE_PROXYTYPE)
14261434 // if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE)
14271435 {
1436
+ new Exception().printStackTrace();
14281437 System.exit(0);
14291438 ConcaveShape concaveMesh = (ConcaveShape) shape;
14301439 //btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30));
....@@ -1524,7 +1533,7 @@
15241533
15251534 public void drawSphere(iCameraPane display, float radius, int slices, int stacks)
15261535 {
1527
- GL gl = display.GetGL();
1536
+ GL gl = display.GetGL0();
15281537
15291538 sphereKey.radius = radius;
15301539 Integer glList = sphereDisplayLists.get(sphereKey);
....@@ -1596,7 +1605,7 @@
15961605
15971606 public void drawCylinder(iCameraPane display, float radius, float halfHeight, int upAxis)
15981607 {
1599
- GL gl = display.GetGL();
1608
+ GL gl = display.GetGL0();
16001609
16011610 gl.glPushMatrix();
16021611 switch (upAxis)