.. | .. |
---|
314 | 314 | bRep = null; |
---|
315 | 315 | } |
---|
316 | 316 | |
---|
317 | | - void DrawNode(CameraPane display, Object3D /*Composite*/ root, boolean selected) // ?? |
---|
| 317 | + void DrawNode(iCameraPane display, Object3D /*Composite*/ root, boolean selected) // ?? |
---|
318 | 318 | { |
---|
319 | 319 | // super.DrawNode(display,root,selected); |
---|
320 | 320 | |
---|
.. | .. |
---|
330 | 330 | e.printStackTrace(); |
---|
331 | 331 | } |
---|
332 | 332 | |
---|
333 | | - display.GetGL().glPushMatrix(); |
---|
| 333 | + //display.GetGL().glPushMatrix(); |
---|
| 334 | + display.PushMatrix(LA.Identity, 1); |
---|
334 | 335 | Vector3f v = ragdolls.get(0).bodies[0].worldTransform.origin; |
---|
335 | 336 | // display.GetGL().glTranslatef(-v.x,0,-v.z); |
---|
336 | 337 | |
---|
337 | 338 | super.DrawNode(display, root, selected); |
---|
338 | | - display.GetGL().glPopMatrix(); |
---|
| 339 | + //display.GetGL().glPopMatrix(); |
---|
| 340 | + display.PopMatrix(LA.Identity); |
---|
339 | 341 | |
---|
340 | 342 | // assert(bRep != null); |
---|
341 | 343 | |
---|
.. | .. |
---|
451 | 453 | int startvertex; |
---|
452 | 454 | int currentobject; |
---|
453 | 455 | |
---|
454 | | - public void renderme(CameraPane display) |
---|
| 456 | + public void renderme(iCameraPane display) |
---|
455 | 457 | { |
---|
456 | | - GL gl = display!=null?display.getGL():null; |
---|
| 458 | + GL gl = display!=null?display.GetGL0():null; |
---|
457 | 459 | |
---|
458 | 460 | // gl0 = gl; |
---|
459 | 461 | if (GetDynamicsWorld() != null) |
---|
.. | .. |
---|
796 | 798 | } |
---|
797 | 799 | } |
---|
798 | 800 | |
---|
799 | | - public void drawCube(CameraPane display, float extent) |
---|
| 801 | + public void drawCube(iCameraPane display, float extent) |
---|
800 | 802 | { |
---|
801 | | - GL gl = display.getGL(); |
---|
| 803 | + GL gl = display.GetGL0(); |
---|
802 | 804 | |
---|
803 | 805 | extent = extent * 0.5f; |
---|
804 | 806 | |
---|
.. | .. |
---|
838 | 840 | |
---|
839 | 841 | private /*static*/ float[] glMat = new float[16]; |
---|
840 | 842 | |
---|
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) |
---|
842 | 844 | { |
---|
843 | 845 | GL gl = null; // display.getGL(); |
---|
844 | 846 | |
---|
.. | .. |
---|
871 | 873 | |
---|
872 | 874 | if (shape.getShapeType() == BroadphaseNativeType.COMPOUND_SHAPE_PROXYTYPE) |
---|
873 | 875 | { |
---|
| 876 | + new Exception().printStackTrace(); |
---|
874 | 877 | System.exit(0); |
---|
875 | 878 | CompoundShape compoundShape = (CompoundShape) shape; |
---|
876 | 879 | Transform childTrans = transformsPool.get(); |
---|
.. | .. |
---|
901 | 904 | { |
---|
902 | 905 | case BOX_SHAPE_PROXYTYPE: |
---|
903 | 906 | { |
---|
| 907 | + new Exception().printStackTrace(); |
---|
904 | 908 | System.exit(0); |
---|
905 | 909 | BoxShape boxShape = (BoxShape) shape; |
---|
906 | 910 | Vector3f halfExtent = boxShape.getHalfExtentsWithMargin(vectorsPool.get()); |
---|
.. | .. |
---|
912 | 916 | } |
---|
913 | 917 | case SPHERE_SHAPE_PROXYTYPE: |
---|
914 | 918 | { |
---|
| 919 | + new Exception().printStackTrace(); |
---|
915 | 920 | System.exit(0); |
---|
916 | 921 | SphereShape sphereShape = (SphereShape) shape; |
---|
917 | 922 | float radius = sphereShape.getMargin(); // radius doesn't include the margin, so draw with margin |
---|
.. | .. |
---|
958 | 963 | |
---|
959 | 964 | case STATIC_PLANE_PROXYTYPE: |
---|
960 | 965 | { |
---|
| 966 | + new Exception().printStackTrace(); |
---|
961 | 967 | System.exit(0); |
---|
962 | 968 | StaticPlaneShape staticPlaneShape = (StaticPlaneShape) shape; |
---|
963 | 969 | float planeConst = staticPlaneShape.getPlaneConstant(); |
---|
.. | .. |
---|
1004 | 1010 | |
---|
1005 | 1011 | case CYLINDER_SHAPE_PROXYTYPE: |
---|
1006 | 1012 | { |
---|
| 1013 | + new Exception().printStackTrace(); |
---|
1007 | 1014 | System.exit(0); |
---|
1008 | 1015 | CylinderShape cylinder = (CylinderShape) shape; |
---|
1009 | 1016 | int upAxis = cylinder.getUpAxis(); |
---|
.. | .. |
---|
1356 | 1363 | // for polyhedral shapes |
---|
1357 | 1364 | if (shape.isPolyhedral()) |
---|
1358 | 1365 | { |
---|
| 1366 | + new Exception().printStackTrace(); |
---|
1359 | 1367 | System.exit(0); |
---|
1360 | 1368 | PolyhedralConvexShape polyshape = (PolyhedralConvexShape) shape; |
---|
1361 | 1369 | |
---|
.. | .. |
---|
1425 | 1433 | if (shape.isConcave())//>getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE||shape->getShapeType() == GIMPACT_SHAPE_PROXYTYPE) |
---|
1426 | 1434 | // if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE) |
---|
1427 | 1435 | { |
---|
| 1436 | + new Exception().printStackTrace(); |
---|
1428 | 1437 | System.exit(0); |
---|
1429 | 1438 | ConcaveShape concaveMesh = (ConcaveShape) shape; |
---|
1430 | 1439 | //btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); |
---|
.. | .. |
---|
1522 | 1531 | private static Map<SphereKey, Integer> sphereDisplayLists = new HashMap<SphereKey, Integer>(); |
---|
1523 | 1532 | private static SphereKey sphereKey = new SphereKey(); |
---|
1524 | 1533 | |
---|
1525 | | - public void drawSphere(CameraPane display, float radius, int slices, int stacks) |
---|
| 1534 | + public void drawSphere(iCameraPane display, float radius, int slices, int stacks) |
---|
1526 | 1535 | { |
---|
1527 | | - GL gl = display.getGL(); |
---|
| 1536 | + GL gl = display.GetGL0(); |
---|
1528 | 1537 | |
---|
1529 | 1538 | sphereKey.radius = radius; |
---|
1530 | 1539 | Integer glList = sphereDisplayLists.get(sphereKey); |
---|
.. | .. |
---|
1594 | 1603 | private static Map<CylinderKey, Integer> cylinderDisplayLists = new HashMap<CylinderKey, Integer>(); |
---|
1595 | 1604 | private static CylinderKey cylinderKey = new CylinderKey(); |
---|
1596 | 1605 | |
---|
1597 | | - public void drawCylinder(CameraPane display, float radius, float halfHeight, int upAxis) |
---|
| 1606 | + public void drawCylinder(iCameraPane display, float radius, float halfHeight, int upAxis) |
---|
1598 | 1607 | { |
---|
1599 | | - GL gl = display.getGL(); |
---|
| 1608 | + GL gl = display.GetGL0(); |
---|
1600 | 1609 | |
---|
1601 | 1610 | gl.glPushMatrix(); |
---|
1602 | 1611 | switch (upAxis) |
---|