I have today updated the BOX2DGFX library (seven years since it was originally written, almost to the day!). The changes are as follows:
1. Added a new PROC_gfxExit procedure, which should be called on exit (probably before PROC_b2Exit). Previously, BOX2DGFX suffered from quite a serious memory leak: memory allocated (in PROC_gfxLoad) for graphics images was never freed. Although not important when running as a standalone application (because the memory will be automatically released on process exit) it could be when programs are run from the IDE.
2. Added PROC_gfxDrawRopeJoint to draw a rope joint as a pair of straight lines. Note that the lines are drawn using the regular LINE statement, *not* using GDI Plus, so for example transparency (alpha) is not supported. Using the GDI+ library simply to draw a couple of lines seemed like overkill, but YMMV.
3. Added PROC_gfxPlotDistanceJoint to plot a distance joint as a graphics image. Note that I have *not* added a routine to draw a Pulley Joint, simply because I have never needed to. Sorry if this omission proves to be an inconvenience.
Discussions related to the code libraries supplied with BB4W & BBCSDL
1 post • Page 1 of 1
Posting this on behalf of Richard.