Stereo cursor

How do I make a stereo, i.e., an independent cursor in the left and right views, cursor? Can I use native cursors or do I have to supply all the tracking and bookkeeping code?
Thanks.

Howdy,

I had this problem last year for my stereo app. My solution was to render a soccor ball sitting on the scene corresponding to the 2D cursor. Given the system’s 2D cursor location, I rendered a middle eye view and grabbed the depth of the pixel under the 2D cursor. Unprojecting these points gives a 3D location, which was the centre of the soccor ball. The effect is a 3D entity that can appear in stereo and dart in and out of the scene, as though the user was draping their finger around the place (and naturally touching the cloest thing they can see).
I should point out that you don’t need to render the FULL scene from the middle eye. You can set up a scissor test and disable writing to the colour buffer.

I hope this helps.

cheers,
John

Windows’ cursors are GDI stuff and do not know of stereo. They would always occur on the plane of zero parallax.
So yes, you have to do the bookkeeping yourself.
If you have your stereo view matrices calculated you have all you need to draw a 3D cursor. Just draw something like a crosshair on all three axis (hey, what is the plural of axis in English?) on the 3D spot you want it. Manipulate x and y analogous to the mouse movement and z for example while dragging with the right mouse button pressed (up is in, down is out).
If z-buffereing is enabled for the crosshair you have perfect feedback for surface positions of the objects in your scene.