Horde3D

Next-Generation Graphics Engine
It is currently 28.11.2024, 03:43

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 27.03.2008, 17:36 
Offline

Joined: 25.01.2008, 22:40
Posts: 3
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).

_________________
Fulvio Esposito


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 27.03.2008, 23:25 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 28.03.2008, 02:14 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 28.03.2008, 03:30 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 29.03.2008, 02:21 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 10 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group