Hello everyone !!!
I'm currently working on a stereoscopic OpenGL program. Everything
seems to work fine. Picking, rendering is working, etc.. However
because the application must have a stereoscopic support, picking must
also work in stereo mode. But as you know mouse remains 2D cause it's
controlled by Windows. I tried to hide the cursor and create a new one
specifically for application, but firstly, it just doesn't look right.
Secondly because I'm glDrawPixels() to draw the new cursor, it doesn't
zoom properly and the image moves when I'm trying to rotate the whole
scene. Tries everything I could and it just not what I need !!!
But it is a real problem. Imagine trying to select a point with a flat
mouse cursor especially with negative parallax - POINT is always on
TOP !!!
Has anyone had this problem before ???
Please help
|
|
0
|
|
|
|
Reply
|
clydecollege
|
8/10/2004 6:12:23 PM |
|
Qwerta wrote:
> Hello everyone !!!
>
> I'm currently working on a stereoscopic OpenGL program. Everything
> seems to work fine. Picking, rendering is working, etc.. However
> because the application must have a stereoscopic support, picking must
> also work in stereo mode. But as you know mouse remains 2D cause it's
> controlled by Windows. I tried to hide the cursor and create a new one
> specifically for application, but firstly, it just doesn't look right.
> Secondly because I'm glDrawPixels() to draw the new cursor, it doesn't
> zoom properly and the image moves when I'm trying to rotate the whole
> scene. Tries everything I could and it just not what I need !!!
> But it is a real problem. Imagine trying to select a point with a flat
> mouse cursor especially with negative parallax - POINT is always on
> TOP !!!
>
> Has anyone had this problem before ???
> Please help
The best solution is to use a "3D mouse".
Have you heard about the phantom system !?
http://www.sensable.com/
I'm not sure how they solve the problem of displaying
the cursor, but I've tried it and it's pretty straightforward.
Just out of curiosity. On which project are u working on !?
For which kind of 3D !? Anaglyph, polarized, shutter !?
wpr.
|
|
0
|
|
|
|
Reply
|
Whisper
|
8/10/2004 7:03:02 PM
|
|
Whisper wrote:
> I'm not sure how they solve the problem of displaying
> the cursor, but I've tried it and it's pretty straightforward.
>
If it has a 3D position then you render it
just like any other object in your scene.
If you want it near to the user then you render
it on the near clip plane.
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
Governments, like diapers, should be changed often,
and for the same reason.
|
|
0
|
|
|
|
Reply
|
fungus
|
8/10/2004 9:01:00 PM
|
|
"fungus" <openglMY@SOCKSartlum.com> wrote in message
news:gIaSc.3209$Ul5.2224084@news.ono.com...
> Whisper wrote:
>
> > I'm not sure how they solve the problem of displaying
> > the cursor, but I've tried it and it's pretty straightforward.
> >
>
> If it has a 3D position then you render it
> just like any other object in your scene.
>
> If you want it near to the user then you render
> it on the near clip plane.
>
> --
> <\___/>
> / O O \
> \_____/ FTB. For email, remove my socks.
>
> Governments, like diapers, should be changed often,
> and for the same reason.
Yeah, a 3D cross, drawn in XOR. I use a Zbuffer readback to get the near Z
of the object
upon which it lies for a center, but you might want to place it elsewhere.
|
|
0
|
|
|
|
Reply
|
JB
|
8/10/2004 10:49:46 PM
|
|
Thanks to everyone who replied to the message about the stereoscopic
mouse cursor !!
I was working on the cursor problem and I've seemed to solve some of
the issues but as always others have appeared. The cursor is now drawn
as two primitives - cone and a cylinder (gluQuadrics...). I push the
matrix and load the identity to ensure that the cursor isn't rotated
with the whole scene and moves on its own following the real cursor.
To do this I use GetCursorPos() to get the coordinates of the mouse
and then tranform them with the gluUnProject() to OpenGL-space
coordinates. Drawing my 3D cursor is then just a matter of
glTranslate()ing matrix properly.
HOWEVER gluUnproject() doesn't seem to give correct results. The
values are just too small, say 0.0031 for 657 in real coordinates. So
just to be able to see it I multiply the x, y by 100 - 200. But still
there's still a lag between my cursor and Windows one. And the
distance between the two changes depending on the position on the
screen!
I just don't get it, it doesn't work the way I thought it should. Does
anyone know how to map the cursors, keeping in mind that the aim is to
select a single point so the precision should be high.
Thanks in advance.
|
|
0
|
|
|
|
Reply
|
clydecollege
|
8/18/2004 11:55:18 AM
|
|
|
4 Replies
334 Views
(page loaded in 0.055 seconds)
|