View Full Version : gluPickMatrix
07-20-2007, 03:58 PM
Do you know what matrix calculations happen inside this function?
Is there a detailed explanation somewhere on the web?
Thanks a lot,
07-21-2007, 03:55 AM
The calculation determines, which section of the normalized device coordinates (-1..1 in all axis) maps to the given subsection of the viewport.
This subsection of the NDC is then strechted and translated so it covers the whole -1...1 range.
In effect you "pick" a subsection of the viewport and "zoom" into it.
07-21-2007, 08:16 AM
I know, but I need to do it manually. I need all the math steps to reproduce it.
here is the direct link to the file (last function):
and this is the opengl sample implementation:
ogl-sample implementation (http://oss.sgi.com/cgi-bin/cvsweb.cgi/projects/ogl-sample/main/gfx/lib/)
(probably somewhere in Mesa3d's source code, too)
07-21-2007, 03:06 PM
Wonderful! Thanks a lot kon, it is exactly what I was looking for!!!
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.