On 27/02/2013, at 4:23 PM, Michael Maul wrote:

> Well one of the things I liked about FLTK is that is has few dependencies, 
> tight GL integration , a simple interface and is cross platform and has been 
> around long enough to bloody well work well on the platforms it supports.
> 
> Theoretically it looks even more appealing, FLTK 1.X is solid that is great. 
> FLTK 3 that is still under development but getting closer to being stable, 
> what makes 3.X interesting is that it supports skinning and can render 
> directly to a GL Window.
> Not that current interface will work with 3.X but port to will be easier that 
> going from scratch. In the meantime 1.X give
> a nice stable GUI.

Except the callbacks suck. No client data pointer. 2.X promised that.
I'll have to look at 3.X I guess.

There is a way to fix this, but it requires implementing weak pointers.

The core idea is this: given any (Felix allocated) pointer, you can associate
a second object with it, i.e. a map:

        weak: ptr -> ptr

Obviously we can use a JudyLArray for this. The tricky bit is to delete the
entry in the array when the domain object is deleted by the GC.
This means the weak map object has to be known to the GC itself,
so it can do the purge.

With this in place, given any data structure, for any object in the data
structure you can "add" properties non-invasively.

Now, this cannot work as written for non-Felix objects.
Clearly you can make an associator tho, mapping say a window
and a callback pair to an extra pointer. The only trick is ensuring
the mapping is removed when the window dies.


> If you can give me some debugging output I might be able to tell you what 
> problems the examples are having on your system. I suspect you may not have 
> built FLTK with support for the dependent libs.

I've no idea what I built. I just said:

        make
        sudo make install
        cd examples
        make

and then ran one example. 

> I hope 06-cube.flx was the one that worked for you (one of the GL demos), 
> that one is neat.

I'm confused. Where is this file?

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to