I don’t like cross forum posting, but I tried over at bullet forums with no reply a couple of days ago. So I’m going to see if anyone here has a response 
Hi, i’m having some troubles with the IDebugDraw.
here is the initialization code
iDebugDraw = new JPCTDebugDraw(world, buffer);
iDebugDraw.setDebugMode(DebugDrawModes.DRAW_WIREFRAME);
dynamicWorld.setDebugDrawer(iDebugDraw);
called in the draw loop
dynamicWorld.debugDrawWorld();
the implemented IDebugDraw
package jpctbullet;
import java.awt.Color;
import java.awt.Graphics;
import javax.vecmath.Vector3f;
import com.threed.jpct.*;
import com.bulletphysics.linearmath.IDebugDraw;
import com.bulletphysics.linearmath.VectorUtil;
public class JPCTDebugDraw extends IDebugDraw{
private int _debugMode;
private World _world;
private FrameBuffer _buffer;
private SimpleVector Vec3fToSVec(Vector3f vector)
{
// JPCT uses a inverted ZY axis and coordinates so flip them
return new SimpleVector(vector.x, -vector.y, -vector.z);
}
public JPCTDebugDraw(World w, FrameBuffer b)
{
_world = w;
_buffer = b;
}
public void setDebugMode(int debugMode)
{
_debugMode = debugMode;
}
public int getDebugMode()
{
return _debugMode;
}
public void drawLine(Vector3f from, Vector3f to, Vector3f color)
{
if(_debugMode > 0)
{
Camera cam = _world.getCamera();
Graphics g = _buffer.getGraphics();
Color lastColour = g.getColor();
SimpleVector pointA = Interact2D.project3D2D(cam, _buffer, Vec3fToSVec(from));
SimpleVector pointB = Interact2D.project3D2D(cam, _buffer, Vec3fToSVec(to));
g.setColor(new Color(color.x, color.y, color.z));
// do not know why, but some times pointB is null
if(pointA != null && pointB != null){
g.drawLine((int)pointA.x, (int)pointA.y, (int)pointB.x, (int)pointB.y);
}
g.setColor(lastColour);
}
}
public void draw3dText(Vector3f location, String textString)
{
Camera cam = _world.getCamera();
Graphics g = _buffer.getGraphics();
SimpleVector loc = Interact2D.project3D2D(cam, _buffer, Vec3fToSVec(location));
g.drawString(textString, (int)loc.x, (int)loc.y);
}
public void drawContactPoint(Vector3f pointOnB, Vector3f normalOnB, float distance, int lifeTime, Vector3f color)
{
}
public void reportErrorWarning(String warningString)
{
System.out.println(warningString);
}
}
It’s not like the code doesn’t do anything. I does. It draws RGB axis lines regardless of what I set it too. I would like to get it to work so I can see the wireframe rigid bodies. The fact that it does draw the RGB axis line means that at least my drawLine() method is working. Any ideas how I messed it up?