[ODE] drawing code

John DeWeese deweese at ict.usc.edu
Sat May 3 12:25:02 2003


Although I agree that it's important to distribute ODE with batteries
included, there are tradeoffs in using drawstuff to do this. drawstuff
is much like a mini-GLUT, except with more bugs and less cross platform
support. For example, drawstuff doesn't get many keystrokes properly
(eg. ctrl-x) on windows, and X support doesn't work on IRIX. I'm not
complaining in abstract here; I actually use ODE on IRIX as well as
Win-n-Lin(tm).  :)

Here's an option for ya: keep drawstuff pretty much as it is, but
reimplement it to use GLUT instead of custom windowing and event code.
The benefits of real cross-platformness (plus some easier
user-customizable extensibility), for the cost of having GLUT installed.
This is likely to REDUCE the bugs in drawstuff, since it's a simpler
GLUT-wrapper with fewer things to do. Also, this may make it easier to
do demos in other languages; I know python and perl at least have stable
GLUT wrappers.

Regarding the list below, if GLUT were used, we'd take a little hit on
#1, but benefit in #2 and #3, while keeping #4. Drawstuff code will be
smaller, bugs are isolated between well-tested GLUT and drawstuff, and
it keeps the same interface.

I fully realize that being open source, I should not complain about it
but put my code where my mouth is, but just wanted to share opinion.

   - John

Now here are some cons:
>>SDL is better. I challenge anyone to find a platform on which GLUT is
>>supported and SDL is not. SDL should be used instead of GLUT.
> 
> 
> I don't doubt that SDL and GLUT are better it many ways, but the current
> "drawstuff" system has some advantages that they do not:
>
>
> 
> 1) It's self-contained - there's nothing else to download or install
>
> 2) It's tiny - all of the source code can be viewed and understood quickly
> 
> 3) Also as a result 2), it can be determined very quickly if a bug lies in
> drawstuff or in ODE itself.
> 
> 4) As a result of 1) and 2), it's very easy for newcomers to extract the
> essence of ODE from the demo code, and integrate it into their own
> application.  
> 
> Drawstuff exists for two purposes: first, to provide a foundation on which
> to demonstrate bugs in ODE; second, to demonstrate the use of ODE to new
> users.  For both roles, drawstuff's simplicity is its most important
> feature.  An ODE demonstration can't get much simpler than what drawstuff
> provides, and I think that makes drawstuff superior to SDL or GLUT.
> 
> An application that isolates and demonstrates a bug in ODE must be
> as trivial as possible in order to be certain that the bug in question
> really likes with ODE and not elsewhere in the application.
> 
> In order to understand how to use ODE, it helps to see ODE in use on your
> target platform - with drawstuff being so small, that doesn't take long at
> all.  That said, if your target platform is GLUT or SDL, then sample code
> for those platforms would surely be helpful. :-)  
> 
> While I'm sure that *both* GLUT and SDL demos would be valuable, I think
> they both belong in the /contrib side of the ODE distribution - they
> should not replace drawstuff.  For the matter, demos for C#, Java, Python,
> etc, etc, would also be pretty cool.
>