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

Irrlicht with Derelict?

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
revcompgeek



Joined: 24 Nov 2007
Posts: 27

PostPosted: Tue Jul 01, 2008 4:03 pm    Post subject: Irrlicht with Derelict? Reply with quote

I have been wanting to use the Irrlicht graphics engine with D and I noticed that it compiles to a shared library. Irrlicht is a C++ library, so I was wondering what the best way to go about this is. But since it uses a shared library I thought Derelict might be a good idea.
_________________
Mac OS 10.5.8 PowerPC
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Tue Jul 01, 2008 8:06 pm    Post subject: Reply with quote

It's not possible to fit a binding to Irrilicht into Derelict's loader architecture. The problem lies with the class definitions. Walter added some C++ compatibility in D2, but AFAIK it isn't 100% reliable. But it's still not possible in D1, so that rules it out for Derelict.

To use Irrilicht from D, you'll first need to create an intermediate layer in C. Then you'd create a D binding to the intermediate layer. The developer of OpenMW did the same in order to use OGRE from D, so you may want to check that out for ideas.

I've toyed with the idea for a couple of years now of actually porting Irrilicht to D. There's only so much time in a day, though.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
revcompgeek



Joined: 24 Nov 2007
Posts: 27

PostPosted: Wed Jul 02, 2008 6:14 pm    Post subject: Reply with quote

I wonder if I could use BCD to generate bindings and just link Irrlicht directly into my program. That would simplify a lot.
_________________
Mac OS 10.5.8 PowerPC
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Fri Jul 04, 2008 4:44 am    Post subject: Reply with quote

revcompgeek wrote:
I wonder if I could use BCD to generate bindings and just link Irrlicht directly into my program. That would simplify a lot.


BCD, AFAIK, is designed to work with C, not C++. It likely wouldn't understand the class declarations. But it's not just the binding declarations that are the issue. It's the C++ ABI.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
revcompgeek



Joined: 24 Nov 2007
Posts: 27

PostPosted: Sat Jul 05, 2008 12:19 am    Post subject: Reply with quote

Actually BCD clames to work on C++ classes and even templates, but I cannot get templates to work with D. I think the only solution is to port Irrlicht to D, and maybe it will bind better when D2 is released. Are you still interested in porting Irrlicht? Because I think I might start doing it.
_________________
Mac OS 10.5.8 PowerPC
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sun Jul 06, 2008 4:39 am    Post subject: Reply with quote

revcompgeek wrote:
Are you still interested in porting Irrlicht? Because I think I might start doing it.


Go for it. I barely have time for the project I'm currently working on.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
revcompgeek



Joined: 24 Nov 2007
Posts: 27

PostPosted: Mon Jul 07, 2008 12:45 am    Post subject: Reply with quote

Actually, Irrlicht is a huge project, and I have been wanting to write a game engine anyway, so I am just going to make my own.
_________________
Mac OS 10.5.8 PowerPC
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict 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