Horde3D
http://horde3d.org/forums/

[Design] Why C++ engine binding is imperative-based?
http://horde3d.org/forums/viewtopic.php?f=1&t=264
Page 1 of 1

Author:  Fulvio [ 27.03.2008, 17:36 ]
Post subject:  [Design] Why C++ engine binding is imperative-based?

Horde3D is developed in c++ using object oriented techniques, why the client interface is based on a handle+function model?

P.S.: The only reason I can give is related to DLL issue (it's easy to export functions, it could be a lot difficult to export class, class templates and so).

Author:  marciano [ 27.03.2008, 23:25 ]
Post subject: 

The main reason for the imperative interface is portability. It makes the engine practically independent of the programming language. We already have wrappers for C#, Java, Lua, D, Euphoria and creating new ones is done quickly.

Another reason is that I think this sort of interface is easier to learn and use since you don't need to know the complete internal class structure of Horde.

All in all Horde3D should be considered as a component rather than a class library. I think with this philosophy it fits nicely the strong trend to make game entity systems component-based.

Author:  DDd [ 28.03.2008, 02:14 ]
Post subject: 

marciano wrote:
We already have wrappers for C#, Java, Lua, D, Euphoria and creating new ones is done quickly.


Do you use swig to create the wrappers?

Author:  DarkAngel [ 28.03.2008, 03:30 ]
Post subject: 

This also gives the developers the freedom to make any changes that they wish to the internal C++ classes while keeping the external C interface the same.

If the engine was exported as a full class-library, much more care would have to be taken when re-designing internal components.

Author:  marciano [ 29.03.2008, 02:21 ]
Post subject: 

DDd wrote:
Do you use swig to create the wrappers?


I have created none of the wrappers myself but as far as I know the Java wrapper is done with swig.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/