Box2D Forums

It is currently Wed May 22, 2013 10:25 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: The 2.0 Patch Thread
PostPosted: Thu Mar 06, 2008 11:18 am 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
Now that 2.0 is out I would like to open up Box2D for community patches. If you have any C++ patches for 2.0, please post them to this thread or send me PM.

I'm looking for:
- projects/makefiles for other compilers/platforms
- source code fixes for othe compilers/platforms
- bug fixes
- features
- comment typo fixes or additions
- manual typo fixes or additions

Please keep your patches as small as possible. For example, please don't post patches that change a bunch of white space or rename lots of variables.

I would like to do this in a more organized fashion than in the past because I lost track of some patches and also forgot to give everyone credit on the contributers page: http://www.box2d.org/contributors.html


Top
 Profile  
 
 Post subject: Re: The 2.0 Patch Thread
PostPosted: Thu Mar 06, 2008 2:52 pm 
Offline

Joined: Thu Feb 28, 2008 1:14 pm
Posts: 8
XCode 3.0 project for Box2D 2.0

Added new files to project
Fixed missing enable C++ rtti for debug build.


Attachments:
Archive.zip [11 KiB]
Downloaded 186 times
Top
 Profile  
 
 Post subject: Re: The 2.0 Patch Thread
PostPosted: Fri Mar 07, 2008 10:20 am 
Offline

Joined: Wed Oct 24, 2007 12:14 pm
Posts: 38
By patch you mean something like an automated script which will change the source files? If so, how can I make one when I have all the changes marked in a blocks of //BLA ... //~BLA ? I am not very expirienced with this :)


Top
 Profile  
 
 Post subject: Re: The 2.0 Patch Thread
PostPosted: Fri Mar 07, 2008 11:03 am 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
SVN can automatically create a patch file based on your changes. You'll have to work against the SVN version. If you run windows, I recommend using TortoiseSVN, it works beautifully.


Top
 Profile  
 
 Post subject: Re: The 2.0 Patch Thread
PostPosted: Fri Mar 07, 2008 11:36 am 
Offline

Joined: Wed Oct 24, 2007 12:14 pm
Posts: 38
Erin Catto wrote:
SVN can automatically create a patch file based on your changes. You'll have to work against the SVN version. If you run windows, I recommend using TortoiseSVN, it works beautifully.


Oh, I didn't know it altough I use TortoiseSVN already:)
So I suppose I should delete these //BLA comments or they appear in the code after patching, right?


Top
 Profile  
 
 Post subject: Re: The 2.0 Patch Thread
PostPosted: Sat Mar 08, 2008 12:09 pm 
Offline

Joined: Sat Feb 16, 2008 4:45 pm
Posts: 6
Hi,

I noticed the latest rev adds a user specific project file:
Build/Xcode/Box2D.xcodeproj/grrussel.pbxuser
You may want to remove it, since it's of no use unless you are grrussel.

Also the testbed doesn't build on the Mac.

I've attached a patch. This also includes a freeglut ifdef for
glutMouseWheelFunc, which isn't in OSX's glut.

Cheers,
Frank.


Attachments:
box2d-20080308.patch [8.3 KiB]
Downloaded 156 times
Top
 Profile  
 
 Post subject: Re: The 2.0 Patch Thread
PostPosted: Sat Mar 08, 2008 12:14 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
Frank: thanks, I applied the patch.

BTW, why can't the Mac build freeglut and use that instead of glut?


Top
 Profile  
 
 Post subject: Re: The 2.0 Patch Thread
PostPosted: Sat Mar 08, 2008 2:37 pm 
Offline

Joined: Sat Feb 16, 2008 4:45 pm
Posts: 6
Erin Catto wrote:
Frank: thanks, I applied the patch.

BTW, why can't the Mac build freeglut and use that instead of glut?


Certainly possible, but freeglut currently doesn't support native OpenGL on the Mac.
You could build against X11/GL. The X11 dependency means the X server has to be running and prior to 10.5 X11 was an optional install.
Much easier to ifdef one line...

F.


Top
 Profile  
 
 Post subject: Re: The 2.0 Patch Thread
PostPosted: Sat Mar 08, 2008 3:06 pm 
Offline

Joined: Wed Jan 02, 2008 3:19 am
Posts: 67
I have a pretty large patch that includes:

1. Fixes to includes for testbed (the includes currently reference "freeglut/gl/glut.h" when the freeglut in Contrib uses "freeglut/GL/glut.h")
2. Gnu Makefiles to build the Contributed software (glui and freeglut), four versions of the library (float, fixed, nintendo DS float and nintendo DS fixed), and two versions of the testbed (float and fixed). You should be able to build things separately or build everything from one top level Makefile, including this very patch!
3. ewjordan's concave polygon decomposition code
4. Fixed Point implementation that redefines the float32 type to be "Fixed". This change requires all references to floating point stuff like FLT_EPLISON, FLT_MAX, etc. to change to something more generic so that they can be redefined between the float and fixed point version. In this port both the fixed and the floating point versions can be built, based on a compile-time flag. Care was taken so that the floating point version should suffer little or no performance degradation when compiled.
5. Nintendo DS version of the fixed point implementation that includes use of the special sqrt and long long division hardware.

The performance of the fixed point is currently not perfect, but usable. All of the testbed examples will run and not assert, but there are clear differences in performance between the float and fixed: biped (balls go through walls, grabbing on guy will cause havoc), car (grabbing onto the car will sometimes send it up in the air) and pyramid (the top square does not fly off and it takes a long time for things to settle to blue, but they do eventually).

This patch is a joint effort by 0xtobw and myself. I am including it here more to start a discussion on what pieces of this will be included an how they might be included. Like I said, it is a big patch with many inter-related pieces.


Attachments:
box2d_fixed_r127.patch.zip [30.91 KiB]
Downloaded 181 times
Top
 Profile  
 
 Post subject: Re: The 2.0 Patch Thread
PostPosted: Sat Mar 08, 2008 7:30 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
kavaler: I haven't looked at the patch yet, but here's a few comments:

- First of all, thanks for putting this together. I'm sure a lot of people are interested in the fixed point version.
- I believe Eric (ewjordan) will be integrating the convex decomposition himself (he has SVN access).
- How much does the fixed point code affect the floating point code? I'd rather not complicate the main code line to support fixed point. Mainly because I don't plan to support it directly (not enough time, etc).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group