FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

question about sinbad's development model...

 
Post new topic   Reply to topic     Forum Index -> Sinbad
View previous topic :: View next topic  
Author Message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Thu Nov 03, 2005 4:15 pm    Post subject: question about sinbad's development model... Reply with quote

Why did you decide on doing a full port instead of creating a C wrapper for ogre and exposing D to this?

I'm also considering pro's / cons of porting a whole C++ library vs creating a C wrapper.

If you create a C wrapper you don't have to worry about bugs introduced through the porting process, can keep up to date easily, and will take less time and effort.

If you go with a full port, you get the original beauty of the library (Object Oriented) and you get to use all the D features on it, but it takes a whole lot longer and is harder to keep up to date, plus you might manage to create new bugs in the conversion to a new language.

I'm wondering if you've thought these issues over and if so, why have you decided on doing a full port?

Thanks

~ Clay
Back to top
View user's profile Send private message AIM Address
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Fri Nov 04, 2005 4:53 am    Post subject: Re: question about sinbad's development model... Reply with quote

clayasaurus wrote:
Why did you decide on doing a full port instead of creating a C wrapper for ogre and exposing D to this?

I'm also considering pro's / cons of porting a whole C++ library vs creating a C wrapper.

If you create a C wrapper you don't have to worry about bugs introduced through the porting process, can keep up to date easily, and will take less time and effort.

If you go with a full port, you get the original beauty of the library (Object Oriented) and you get to use all the D features on it, but it takes a whole lot longer and is harder to keep up to date, plus you might manage to create new bugs in the conversion to a new language.

I'm wondering if you've thought these issues over and if so, why have you decided on doing a full port?

Thanks

~ Clay


(Small note: Very little has happened here in a long time, although I've started to look at it again this last week).

I suppose it is Chris that made the initial decision to make a port, and not just a wrapper. Although we didn't intend for it to be just a port, but an improvement using the features of D...

As we all know, D can't interface directly with C++ because of no namemangling standards, and a whole bunch of binary compatibility problems. Since it is easy to use C from D, and C++ can be wrapped in C, this is a feasible proposition for some libraries.

However, OGRE, isn't just some library. It uses rather large amounts of templates, and to some degree multiple inheritance, especially in strategically important places of the code. I believe that those are concepts that might be difficult to wrap in C, and thus get over in D in an usable state.

In addition, OGRE, as most other 3D engines, has a potentially large base of libraries that it links in for lower level functionality. Reimplementing it in D, should get rid of at least some libraries to depend on, especially those that are C++. I would also love to have complete D libraries, not just D bindings, for as much as possible. Just imagine how quick it would to bootstrap a D-based Gentoo Wink

As for myself, I want to create an 3D engine, because it is something I'm interested in doing, learning along the road. If I just wrapped the OGRE API, I wouldn't learn very much about the basic technologies and algorithms. And since creating a whole new engine is quite much work, fleshing out the API, etc, I think that reimplementing an existing API that seems to have a good design, is a good way to learn, and get going fairly quickly.
Back to top
View user's profile Send private message
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Wed Nov 30, 2005 12:31 am    Post subject: Reply with quote

Basically what larsivi said. Smile Although, in the -- what, two years?! -- since I proposed the Sinbad project, I've been wondering if I had exactly the right idea. Namely, should we port OGRE, or should we write something new and original, with a large shameless influence from OGRE, and other libraries.

Oh, and another reason I wanted to port instead of wrap, was because I was (am) invisioning an add-on library providing 3D Sound capabilities directly in the OGRE objects. So an object would not only represent, say, a radio sitting on a table, but also the sounds/music that go with it, so that volume and panning can be calculated almost automatically. Good Times had by all.

One of the hangups (possibly the biggest one) has actually been the volatile nature of the D platform. I think I mentioned in some other thread that I'm personally waiting for two things: a D release worth sitting on for the project (I actually think we're pretty close!) and more personal free time to devote to it. The latter might prove difficult, sadly.
_________________
Chris Nicholson-Sauls
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Sinbad All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group