Hi Julian,

In testing of the lua script and fixes to the serializers/lua plugin I
found I wasn't able to assign functions as cull and event callbacks so
I've now added this functionality, as well as adding the
dynamic_cast<> change you suggested.  With these sets of changes I was
able to get the follow script to work just fine.

This illustrates a few of the capabilities of the scripting side.

Robert.


-- test.lua --

count = 300

function test (s)
    print("test ", count)
    count = count + 1


    if (count==400) then

        print "FOUR HANDRED";

        eventCallback = function (t)

            print("Event callback!!!!", t);

        end

        cullCallback = function (t)

            print("Cull callback!!!!", t);

        end

        s.EventCallback = eventCallback;


        s.CullCallback = cullCallback;

    end



    ucb=s.UpdateCallback
    print("   lua updated callback ",ucb.className);

    ecb=s.EventCallback
    print("   lua event callback ",ecb);

    ccb=s.CullCallback
    print("   lua cull callback ",ccb);

end
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to