On 8. Sep 2010, at 11:41, Aren [via Software] wrote:
> Hi,
> I want to add mouse pick(select an object after click) support to
> my application, but I confuse about where to add intersecting code.
>
> First I try to add it to Config::handleEvent(), but failed, because
> intersecting needs viewport and projection matrix (I call glGet to
> get them)which are empty or not initialized yet.
I tend to avoid glGet wherever possible. For this code you don't need
them since you have all the data in the event itself. See the attached
(quick&dirty) patch for doing the picking locally in the Channel. This
code can (and should) easily be placed in Config::handleEvent.
> Then I remove them to Channel::processEvent(), it can do
> intersecting correctly. In my FrameData, there's an objectID refer
> to selected object. After intersecting , I reset objectID in
> FrameData. But it seems client nodes
> haven't get the new objectID.
The client-side FrameData object is never committed, since the master
instance is on the application. Therefore the clients never get
updated. Do the event handling in Config::handleEvent and things
should be fine.
Cheers,
Stefan.
View this message in context:
Re: mouse pick
Sent from the
Equalizer - Parallel Rendering mailing list archive at Nabble.com.