Horde3D

Next-Generation Graphics Engine
It is currently 25.06.2024, 07:05

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 11.05.2009, 13:56 
Offline

Joined: 11.05.2009, 13:44
Posts: 5
Hi guys!
Is it possible to run Horde from an external program?
In my case the datas are calculated in Matlab iteratively and I wanna give Horde3D for every timestep new datas?
Any suggestions?
Thanks a lot!


Top
 Profile  
Reply with quote  
PostPosted: 11.05.2009, 15:06 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
No need for an external program, you can load the Horde3D DLL directly into Matlab.
See this page for an example.


Top
 Profile  
Reply with quote  
PostPosted: 11.05.2009, 22:15 
Offline

Joined: 11.05.2009, 13:44
Posts: 5
So as I understood it, I can load the libaries from Horde into Matlab and can run from there any functions (by using calllib) of the engine?


I tried it in that way from the example:

%% Load the library from dll
loadlibrary Horde3D.dll
calllib('Horde3D','methodname')

disp('Call to C DLL:');
tic; calllib('Horde3D','methodname'); toc

But I have problems with the 'calllib'. It never finds the method.
Can someone give me an easy example for running a sample -like knight- from matlab?


Top
 Profile  
Reply with quote  
PostPosted: 11.05.2009, 22:23 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Running the knight sample and calling Horde3D functions are two different aspects. The knight demo is a C++ application while the Horde3D library is a DLL with C functions. I don't have a Matlab installation available so I can't test it myself. But I guess google should help you finding a working example how to load a DLL and call an exportet method from it.


Top
 Profile  
Reply with quote  
PostPosted: 12.05.2009, 10:43 
Offline

Joined: 11.05.2009, 13:44
Posts: 5
I got it.
I can use all the functions from matlab.
But the thing is that I modified allready a sample in VisualC++ and wanna run it in Matlab.
So it would be easier to write a Mex file and load Horde in here, instead of writing everything new with 'callib'.
So how can I run a sample in Matlab.

Btw when I load the dll in Matlab the functions came out binary. (.obj)


Last edited by Panama on 12.05.2009, 11:09, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: 12.05.2009, 10:54 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
One straight forward approach would be converting the sample to a DLL and write C functions that can be exported from it to allow interaction with the sample. But there may be other possibilities, like adding command line parameters and run the application using something like dos/unix from matlab. Don't know, maybe it's also possible to create an OpenGL context in Matlab and port the sample to it.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 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:  
Powered by phpBB® Forum Software © phpBB Group