View previous topic :: View next topic |
Author |
Message |
revcompgeek
Joined: 24 Nov 2007 Posts: 27
|
Posted: Tue Jul 01, 2008 4:03 pm Post subject: Irrlicht with Derelict? |
|
|
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Tue Jul 01, 2008 8:06 pm Post subject: |
|
|
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 |
|
|
revcompgeek
Joined: 24 Nov 2007 Posts: 27
|
Posted: Wed Jul 02, 2008 6:14 pm Post subject: |
|
|
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Fri Jul 04, 2008 4:44 am Post subject: |
|
|
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 |
|
|
revcompgeek
Joined: 24 Nov 2007 Posts: 27
|
Posted: Sat Jul 05, 2008 12:19 am Post subject: |
|
|
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sun Jul 06, 2008 4:39 am Post subject: |
|
|
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 |
|
|
revcompgeek
Joined: 24 Nov 2007 Posts: 27
|
Posted: Mon Jul 07, 2008 12:45 am Post subject: |
|
|
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 |
|
|
|