[eq-dev] eqOSG: Eventhandling
Jonas Walti
waltj3 at bfh.ch
Wed May 6 17:53:17 CEST 2009
Hi all
I added Santosh's idea to my code, which works pretty fine (thanks!).
But when I close my application and the eq server shuts down, a "Debug
Assertion Failed" Message is thrown. With the help of the debugger I
figured out that this happens when the server::_cmdDestroyConfig
operation in server.cpp on line 212 tries to destruct the config object.
The error occurs only if at least one event is stored in the eventQueue
vector in my FrameData object. If nothing is stored, everything shuts
down fine.
Does someone have any idea why this happens?
thanks
jonas
Santosh schrieb:
> Hi Jonas
>
> I have added a member in FrameData and that is
>
> std::vector<eq::Event> eventQueue;
>
> then in FrameData in function getInstanceData and applyInstanceData I
> have added this member like
>
> stream<<data<<eventQueue; and
> stream>>data>>eventQueue;
>
> and in Config::handleEvents() I am adding events in this eventQueue.
> And before adding clear the list in each frame. So in
> Config::handleEvents()
>
> eq::Event eventTmp = event->data;
> mFrameData.eventQueue.push_back(eventTmp);
>
> These events I am taking in each frame from config in
> Pipe::startFrame() and adding in to osg viewer.
>
> rest thing will be taken care by osg viewer.
>
>
>
> Santosh Gaikwad
> MTS Design
> Darshan Solutions Limited
> www.darshan3d.com <http://www.darshan3d.com>
> # +91-99530-99053
>
>
>
> Jonas Walti wrote:
>> Hi Santosh
>>
>> Santosh schrieb:
>>> Hi Jonas
>>>
>>> To handle the key or mouse events in eqOSG , in my implementation I
>>> have collocted all the events in Config::handlEvent() in a vector
>>> list and passed to the Pipe using frame data and converted these
>>> events in OSG and set to the event queue of the osgViewer. You can
>>> get the event queue of the osgViewer using function
>>> viewer->getEventQueue().
>> This was exaclty what I tried to do, but failed on implementation.
>> What exaclty do you save in your Vector-List?
>>
>> Some lines of code (a keypress for example) would help me a lot.
>>
>>
>>>
>>> Hope this will help you ..
>> With one or two hints more a lot... :-)
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> eq-dev mailing list
>> eq-dev at equalizergraphics.com
>> http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
>> http://www.equalizergraphics.com
> ------------------------------------------------------------------------
>
> _______________________________________________
> eq-dev mailing list
> eq-dev at equalizergraphics.com
> http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
> http://www.equalizergraphics.com
More information about the eq-dev
mailing list