Menu

Libraryise structure synth

2008-09-24
2013-05-28
  • Stuart Axon

    Stuart Axon - 2008-09-24

    C / C++ bindings would be nice (with conversion to a lib/dll), so that other programs could use structure synth.

    Once this was done, then other people would probably come and make bindings for other languages.

    Probably the 1st apis to be provided could just be to render a particular scene to a frame buffer provided by the caller.

    A more complete api could include call backs to be called whenever structure synth makes a shape, in case people want a higher level representation, in this way the other program could know about individual shapes as opposed to just one big scene.

     
    • Mikael Hvidtfeldt Christensen

      Hi,

      For a C++ program to use Structure Synth functionality today would actually be easy - the program is quite modular, and it is easy just to use the parts that are of interest (such as the parser, or the model builder). Custom rendering is also quite trivial by subclassing the abstract 'Render' interface, where you can implement exactly how each primitive gets drawn.

      Producing a dynamic or static library can be done by changing the compiler settings.

      Best regards,
      Mikael.

       
    • Stuart Axon

      Stuart Axon - 2008-10-06

      Hi,
        I'm spreading myself really thin on projects at the mo, so hope you don't mind me asking:  can you give an example of the settings needed to compile it as a dynamic library ?  (For linux preferably).   Bit cheeky, but I want to check it out and theres quite a lot going on at the mo :)

      Best Regards
      Stu

       
      • Mikael Hvidtfeldt Christensen

        You can use qmake to create both static and dynamic libraries. See:

        http://doc.trolltech.com/4.3/qmake-common-projects.html#building-a-library

        You will probably need to comment out / rename the 'main' function in the project to avoid multiple entry points in your app.

        Be aware that the GPL imposes certain restrictions on how you can link and use GPL libraries, but if the modules you are linking together are all GPL-licensed, there should be no problem. See for instance this for more info:
        http://www.gnu.org/licenses/gpl-faq.html#NFUseGPLPlugins

        Also notice that I cannot change the license to something else than GPL - since Structure Synth uses Qt Open Source Edition, it is required to use the GPL license.

        Best regards, Mikael.

         
    • Stuart Axon

      Stuart Axon - 2008-10-18

      Interesting - I'll have a go when I next have some time, the GPL thing wouldn't be a problem at first.  I assume that QT is just for the menus etc, not for the 3D?  In that case it might be possible to seperate the 3d part and make the LGPL possibly.  - Not worth worrying about until something is working anyway :)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.