PDA

View Full Version : gluPickMatrix, gluPerspective



08-18-2002, 11:27 PM
Hi

I've been trying to implement a simple zooming function using gluPickMatrix & gluPerspective. What I want is to let the user drag out a rectangle to zoom in on. I track the mouse events to obtain the coordinates for the pick matrix. There are a few things I'm not clear about...

How should the fov angle and the near & far z clipping planes be chosen for gluPerspective? I tried it with a fov of 90 & several values for the near & far planes to see its effects, but I'm not sure I understand what is happening. The proportions of the scene appear to change. This is probably due to the aspect ratio being wrong?(I use the window width/height)

As you can tell, I'm very very confused. Sorry for the trouble =0)

Oh 1 more thing, I'm doing this in X, and I'm trying to figure out how to draw a dragging rectangle as the user picks the area for zooming. I tried to track mouse motion & use glRectd in the rendering function, but it doesn't seem to be working.

Thanks.

08-19-2002, 10:32 PM
hmm ok I think I'm more clear abt gluPerspective now, but still hoping someone can help me solve my problem..

thx neway pinku =0)