posting space mouse events to another process

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
mrg
Posts: 1
Joined: Fri Mar 30, 2007 4:04 am

posting space mouse events to another process

Post by mrg »

I have an application that consists of two processes: a Tcl/Tk GUI that spawns a child process that is an OpenGL graphics app. The GUI provides a parent window for the OpenGL. The OpenGL code creates a child window inside the GUI parent window and draws to it. The parent GUI window gets all the Window events and none are seen by the OpenGL code. I need to somehow pass on the space mouse events from the Tcl/Tk GUI to the OpenGL code so it can modify its display suitable.

I thought this was simple to do and quickly coded up something that captured the space mouse events in the Tcl/Tk and used the PostMessage function to send them on to the child window that belongs to the OpenGL process. They are duly received by the OpenGL code but when I call the SiGetEvent it's not recognised as a space mouse event any more. I'm assuming this is
because the call is coming from a different process than the one the
event was generated in?

Is there a way I can get my OpenGL code to see the space mouse events that are posted to it? Is there some data encoded in the message that I need to modify to make the OpenGL call appear to come from the GUI process?

Is there a better way to do this?
jwick
Moderator
Moderator
Posts: 3339
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

Hi mrg,

I can think of a few of ways:

1) You could switch to our new COM interface (3DxInput).

2) You could call SiInitialize and all that from the OGL process. The data would just communicate between the OGL proc and the driver.

3) You could gather all the motion data in the GUI proc, package it up (after SiGetEvent) and send that to the OGL process. The motion data is not in the Windows event. That's why you can't just forward the windows events.

Jim
3Dx Software Development
Post Reply