Page 1 of 1

OF 080 and FFGL plugin on windows, help needed

Posted: Sun Feb 16, 2014 11:48
by davidemania
Hi friends,
after spending a considerable amount of time trying to make a simple FFGL plugin with OpenFrameworks 080 and ofxFFGLplugin I believe I am almost there, but there still is something puzzling.

As you probably know I managed to modify the existing ofxFFGL code to make it work under OSX with XCode (there should be a link to the code in a previous post), and wanted to try and get the windows version up and running too.

Now it seems that the plugin is being built, the dll generated but Arena refuses to load and activate it. The weird thing is that the sample host application that comes with the original FFGL 1.5 download works, it loads the dll and the plugin is actually doing what it has to.

There must be some difference in the way Arena loads its plugins compared to the sample host, but having no access to its source code I'm afraid I'm stuck :(

For some reason the project exports in the dll a lot of functions "cairo" something, I could not understand why and how to avoid this, but in theory they should be harmless (besides may be inflating the size of dll)

Is there someone able and willing to help with this? I believe it would be nice to have this stuff running!

Here it is possible to download a copy (a rough one but it should work) of what I did so far, just copy the files in "addons" and "apps" in the corresponding locations in your OF 080 tree then open the ".sln" file in the "empty example" dir. A fresh dll should be generated, then you can test it by dragging and dropping over "FFGL host.exe"
If compiler rants about missing poco libraries copy the two I provided where the other poco stuff is in the OF tree.

http://www.cogitamus.it/varie/Test%20of ... vs2012.zip

To test the plugin dll with Arena put in plugins/vfx the newly built dll and the other ones if needed.

thanks to anybody willing to help
Davide

Re: OF 080 and FFGL plugin on windows, help needed

Posted: Sun Feb 16, 2014 11:51
by davidemania
PS the project is actually being built with VS2012, but the newer 2013 should be fine enough provided you set the compiler tool to version 2012 in project options for both the plugin project and the openframeworks library one (in solution explorer right click on each of them, select properties... but you already know that :D )

Re: OF 080 and FFGL plugin on windows, help needed

Posted: Thu Feb 20, 2014 10:59
by drand48
Hi Davide,

I'm not sure what the problem is, but I suspect it could have something to do with the font loading code. Maybe the plugin does not find the file?

I suggest that you isolate the problem by commenting out most of the code and incrementally uncommenting it until you find where the problem is.

As for Cairo, it is part of OpenFrameworks so it will be linked with the plugin. This is the downside of using openframeworks for plugin development, it is easier, but your dll will be bigger :)

Ciao,
Daniel

Re: OF 080 and FFGL plugin on windows, help needed

Posted: Thu Feb 20, 2014 14:36
by davidemania
drand48 wrote: I'm not sure what the problem is, but I suspect it could have something to do with the font loading code. Maybe the plugin does not find the file?

I suggest that you isolate the problem by commenting out most of the code and incrementally uncommenting it until you find where the problem is.
this is what I thought at first (it's the most logical thing to do) but unfortunately the problem lies elsewhere, it seems that plugMain never gets called from host, and this should happen well before the setup phase in which fonts are loaded. Besides the same dll works correctly in the FFGL demo host, so the problem is likely to be in some miscommunication between my dll and Arena. Would be nice to know what Arena is saying when trying to load the plugin, if it eventually throws any error and what.
drand48 wrote: As for Cairo, it is part of OpenFrameworks so it will be linked with the plugin. This is the downside of using openframeworks for plugin development, it is easier, but your dll will be bigger :)
This is fair, but I don't understand why there are about 250 methods in the dll exported by Cairo (and neither where the code to state this is hidden, I could not find out). May be this plethora of methods is confusing Arena someway, and the simpler FFGLhost just ignores them

PS The log file just says

Code: Select all

Load plugin: C:\Program Files (x86)\Resolume Arena 4.1.8\plugins\vfx\FFGL_Plugin_Test_debug.dll
Load failed

Re: OF 080 and FFGL plugin on windows, help needed

Posted: Mon Feb 24, 2014 15:43
by hive8
Hi guys at the Resolume team, I am working with Davide on this as well, was wondering if someone could have a look at it to see whats going on. I have some effects ready done in OF and would love to use them in Resolume.

Re: OF 080 and FFGL plugin on windows, help needed

Posted: Wed Feb 26, 2014 09:38
by hive8
SUCCESS, after many hours of trying, seems we have a working OF wrapper for 080, we tested to compile and run in resolume and it works as far we can tell :).

Re: OF 080 and FFGL plugin on windows, help needed

Posted: Wed Feb 17, 2016 00:27
by discopatrick
It's been a while since this was posted, but would you be able to share your solution?

I'm also trying to find a way to build FFGL plugins from openFrameworks projects.

Re: OF 080 and FFGL plugin on windows, help needed

Posted: Wed Feb 17, 2016 03:27
by hive8
discopatrick wrote:It's been a while since this was posted, but would you be able to share your solution?

I'm also trying to find a way to build FFGL plugins from openFrameworks projects.

I actually abondened it and write OpenGL direct.