.. | .. |
---|
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 | |
---|
342 | | - if (display.isLIVE() && live && display.drawMode == display.SHADOW) // FUCK |
---|
| 344 | + if (Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // FUCK |
---|
343 | 345 | { |
---|
344 | 346 | // float ms = getDeltaTimeMicroseconds(); |
---|
345 | 347 | // float minFPS = 1000000f / 60f; |
---|
.. | .. |
---|
379 | 381 | try |
---|
380 | 382 | { |
---|
381 | 383 | //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")); |
---|
383 | 385 | } catch (java.io.IOException e) |
---|
384 | 386 | { |
---|
385 | 387 | e.printStackTrace(); |
---|
.. | .. |
---|
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) |
---|
.. | .. |
---|
555 | 557 | bRep.startvertices = new int[numObjects]; |
---|
556 | 558 | bRep.averagepoints = new float[(bRep.startvertices.length-1) * 3]; |
---|
557 | 559 | bRep.extremepoints = new float[(bRep.startvertices.length-1) * 3]; |
---|
558 | | - bRep.supportsizes = new float[(bRep.startvertices.length-1)]; |
---|
| 560 | + bRep.supportminsize = new float[(bRep.startvertices.length-1)]; |
---|
| 561 | + bRep.supportmaxsize = new float[(bRep.startvertices.length-1)]; |
---|
559 | 562 | buildrep = true; |
---|
560 | 563 | |
---|
561 | 564 | initialmatrices = new ObjectArrayList<Transform>(); |
---|
.. | .. |
---|
796 | 799 | } |
---|
797 | 800 | } |
---|
798 | 801 | |
---|
799 | | - public void drawCube(CameraPane display, float extent) |
---|
| 802 | + public void drawCube(iCameraPane display, float extent) |
---|
800 | 803 | { |
---|
801 | | - GL gl = display.getGL(); |
---|
| 804 | + GL gl = display.GetGL0(); |
---|
802 | 805 | |
---|
803 | 806 | extent = extent * 0.5f; |
---|
804 | 807 | |
---|
.. | .. |
---|
838 | 841 | |
---|
839 | 842 | private /*static*/ float[] glMat = new float[16]; |
---|
840 | 843 | |
---|
841 | | - public void drawOpenGL(CameraPane display, Transform trans, CollisionShape shape, Vector3f color, int debugMode) |
---|
| 844 | + public void drawOpenGL(iCameraPane display, Transform trans, CollisionShape shape, Vector3f color, int debugMode) |
---|
842 | 845 | { |
---|
843 | 846 | GL gl = null; // display.getGL(); |
---|
844 | 847 | |
---|
.. | .. |
---|
871 | 874 | |
---|
872 | 875 | if (shape.getShapeType() == BroadphaseNativeType.COMPOUND_SHAPE_PROXYTYPE) |
---|
873 | 876 | { |
---|
| 877 | + new Exception().printStackTrace(); |
---|
874 | 878 | System.exit(0); |
---|
875 | 879 | CompoundShape compoundShape = (CompoundShape) shape; |
---|
876 | 880 | Transform childTrans = transformsPool.get(); |
---|
.. | .. |
---|
901 | 905 | { |
---|
902 | 906 | case BOX_SHAPE_PROXYTYPE: |
---|
903 | 907 | { |
---|
| 908 | + new Exception().printStackTrace(); |
---|
904 | 909 | System.exit(0); |
---|
905 | 910 | BoxShape boxShape = (BoxShape) shape; |
---|
906 | 911 | Vector3f halfExtent = boxShape.getHalfExtentsWithMargin(vectorsPool.get()); |
---|
.. | .. |
---|
912 | 917 | } |
---|
913 | 918 | case SPHERE_SHAPE_PROXYTYPE: |
---|
914 | 919 | { |
---|
| 920 | + new Exception().printStackTrace(); |
---|
915 | 921 | System.exit(0); |
---|
916 | 922 | SphereShape sphereShape = (SphereShape) shape; |
---|
917 | 923 | float radius = sphereShape.getMargin(); // radius doesn't include the margin, so draw with margin |
---|
.. | .. |
---|
958 | 964 | |
---|
959 | 965 | case STATIC_PLANE_PROXYTYPE: |
---|
960 | 966 | { |
---|
| 967 | + new Exception().printStackTrace(); |
---|
961 | 968 | System.exit(0); |
---|
962 | 969 | StaticPlaneShape staticPlaneShape = (StaticPlaneShape) shape; |
---|
963 | 970 | float planeConst = staticPlaneShape.getPlaneConstant(); |
---|
.. | .. |
---|
1004 | 1011 | |
---|
1005 | 1012 | case CYLINDER_SHAPE_PROXYTYPE: |
---|
1006 | 1013 | { |
---|
| 1014 | + new Exception().printStackTrace(); |
---|
1007 | 1015 | System.exit(0); |
---|
1008 | 1016 | CylinderShape cylinder = (CylinderShape) shape; |
---|
1009 | 1017 | int upAxis = cylinder.getUpAxis(); |
---|
.. | .. |
---|
1218 | 1226 | } |
---|
1219 | 1227 | else |
---|
1220 | 1228 | { |
---|
1221 | | - if (bRep.averagepoints == null || bRep.extremepoints == null || bRep.supportsizes == null) |
---|
| 1229 | + if (bRep.averagepoints == null || bRep.extremepoints == null || bRep.supportminsize == null || bRep.supportmaxsize == null) |
---|
1222 | 1230 | { |
---|
1223 | 1231 | bRep.averagepoints = new float[(bRep.startvertices.length-1) * 3]; |
---|
1224 | 1232 | bRep.extremepoints = new float[(bRep.startvertices.length-1) * 3]; |
---|
1225 | | - bRep.supportsizes = new float[(bRep.startvertices.length-1)]; |
---|
| 1233 | + bRep.supportminsize = new float[(bRep.startvertices.length-1)]; |
---|
| 1234 | + bRep.supportmaxsize = new float[(bRep.startvertices.length-1)]; |
---|
1226 | 1235 | } |
---|
1227 | 1236 | |
---|
1228 | 1237 | float averagex = 0; |
---|
.. | .. |
---|
1292 | 1301 | } |
---|
1293 | 1302 | } |
---|
1294 | 1303 | |
---|
1295 | | - bRep.supportsizes[currentobject-1] = (float)Math.sqrt(mindist2); |
---|
| 1304 | + bRep.supportminsize[currentobject-1] = (float)Math.sqrt(mindist2); |
---|
| 1305 | + bRep.supportmaxsize[currentobject-1] = (float)Math.sqrt(maxdist2); |
---|
1296 | 1306 | } |
---|
1297 | 1307 | |
---|
1298 | 1308 | // if (hull.numTriangles() > 0) |
---|
.. | .. |
---|
1356 | 1366 | // for polyhedral shapes |
---|
1357 | 1367 | if (shape.isPolyhedral()) |
---|
1358 | 1368 | { |
---|
| 1369 | + new Exception().printStackTrace(); |
---|
1359 | 1370 | System.exit(0); |
---|
1360 | 1371 | PolyhedralConvexShape polyshape = (PolyhedralConvexShape) shape; |
---|
1361 | 1372 | |
---|
.. | .. |
---|
1425 | 1436 | if (shape.isConcave())//>getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE||shape->getShapeType() == GIMPACT_SHAPE_PROXYTYPE) |
---|
1426 | 1437 | // if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE) |
---|
1427 | 1438 | { |
---|
| 1439 | + new Exception().printStackTrace(); |
---|
1428 | 1440 | System.exit(0); |
---|
1429 | 1441 | ConcaveShape concaveMesh = (ConcaveShape) shape; |
---|
1430 | 1442 | //btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); |
---|
.. | .. |
---|
1522 | 1534 | private static Map<SphereKey, Integer> sphereDisplayLists = new HashMap<SphereKey, Integer>(); |
---|
1523 | 1535 | private static SphereKey sphereKey = new SphereKey(); |
---|
1524 | 1536 | |
---|
1525 | | - public void drawSphere(CameraPane display, float radius, int slices, int stacks) |
---|
| 1537 | + public void drawSphere(iCameraPane display, float radius, int slices, int stacks) |
---|
1526 | 1538 | { |
---|
1527 | | - GL gl = display.getGL(); |
---|
| 1539 | + GL gl = display.GetGL0(); |
---|
1528 | 1540 | |
---|
1529 | 1541 | sphereKey.radius = radius; |
---|
1530 | 1542 | Integer glList = sphereDisplayLists.get(sphereKey); |
---|
.. | .. |
---|
1594 | 1606 | private static Map<CylinderKey, Integer> cylinderDisplayLists = new HashMap<CylinderKey, Integer>(); |
---|
1595 | 1607 | private static CylinderKey cylinderKey = new CylinderKey(); |
---|
1596 | 1608 | |
---|
1597 | | - public void drawCylinder(CameraPane display, float radius, float halfHeight, int upAxis) |
---|
| 1609 | + public void drawCylinder(iCameraPane display, float radius, float halfHeight, int upAxis) |
---|
1598 | 1610 | { |
---|
1599 | | - GL gl = display.getGL(); |
---|
| 1611 | + GL gl = display.GetGL0(); |
---|
1600 | 1612 | |
---|
1601 | 1613 | gl.glPushMatrix(); |
---|
1602 | 1614 | switch (upAxis) |
---|