Normand Briere
2019-05-01 20c1a07b76c39462594aedfedfe6e6adb17cd552
GenericJoint.java
....@@ -314,7 +314,7 @@
314314 bRep = null;
315315 }
316316
317
- void DrawNode(CameraPane display, Object3D /*Composite*/ root, boolean selected) // ??
317
+ void DrawNode(iCameraPane display, Object3D /*Composite*/ root, boolean selected) // ??
318318 {
319319 // super.DrawNode(display,root,selected);
320320
....@@ -330,16 +330,18 @@
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
342
- if (display.isLIVE() && live && display.drawMode == display.SHADOW) // FUCK
344
+ if (Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // FUCK
343345 {
344346 // float ms = getDeltaTimeMicroseconds();
345347 // float minFPS = 1000000f / 60f;
....@@ -379,7 +381,7 @@
379381 try
380382 {
381383 //font = FontRender.createFont("Dialog", 11, false, true);
382
- font = new FontRender.GLFont(gl, GraphreeD.class.getResourceAsStream("DejaVu_Sans_11.fnt"));
384
+ font = new FontRender.GLFont(gl, GrafreeD.class.getResourceAsStream("DejaVu_Sans_11.fnt"));
383385 } catch (java.io.IOException e)
384386 {
385387 e.printStackTrace();
....@@ -451,9 +453,9 @@
451453 int startvertex;
452454 int currentobject;
453455
454
- public void renderme(CameraPane display)
456
+ 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)
....@@ -796,9 +798,9 @@
796798 }
797799 }
798800
799
- public void drawCube(CameraPane display, float extent)
801
+ 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
....@@ -838,7 +840,7 @@
838840
839841 private /*static*/ float[] glMat = new float[16];
840842
841
- public void drawOpenGL(CameraPane display, Transform trans, CollisionShape shape, Vector3f color, int debugMode)
843
+ public void drawOpenGL(iCameraPane display, Transform trans, CollisionShape shape, Vector3f color, int debugMode)
842844 {
843845 GL gl = null; // display.getGL();
844846
....@@ -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));
....@@ -1522,9 +1531,9 @@
15221531 private static Map<SphereKey, Integer> sphereDisplayLists = new HashMap<SphereKey, Integer>();
15231532 private static SphereKey sphereKey = new SphereKey();
15241533
1525
- public void drawSphere(CameraPane display, float radius, int slices, int stacks)
1534
+ 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);
....@@ -1594,9 +1603,9 @@
15941603 private static Map<CylinderKey, Integer> cylinderDisplayLists = new HashMap<CylinderKey, Integer>();
15951604 private static CylinderKey cylinderKey = new CylinderKey();
15961605
1597
- public void drawCylinder(CameraPane display, float radius, float halfHeight, int upAxis)
1606
+ 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)