To be fair though, you still need to run glGets on both of those matrices, plentry of 3rd party patches do adjust the projection matrix, so relying on hard coded values would not work in situations where people use, say, the FOV patch. Of course, you know that, but im just saying. Doesnt Kineme have patches to get the matrix values from GL? That ought to get you most of the way there, no?
On Sep 10, 2010, at 10:58 AM, Christopher Wright wrote: >> Um he stated the projection matrix is undocumented because its identity, ie, >> it is not ever messed with, and even if it was, you could glGet it. > > Not quite -- I didn't say it was identity (it is in fact _not_ -- verifying > this is a glGet away, as you've noted), just that it's synthesized once, and > then not touched after it's configured (it's used to position the camera on > the Z axis, for example, which an identity matrix cannot possibly do). It's > undocumented because QC has never documented its matrices, and doesn't have > any plans to that I'm aware of (because there's no reason to do so). > > Identity matrix has a special meaning, and QC's Projection matrix does not > satisfy that meaning at all. > > With all this chatter I'm surprised someone hasn't done: > > GLfloat mat[16]; > glGetFloatv(GL_PROJECTION_MATRIX, mat); > NSLog(... the matrix stuff ...); > glGetFloatv(GL_MODELVIEW_MATRIX, mat); > NSLog(... the matrix stuff ...); > > It's a lot of code, I know, but it's way more exciting than guessing and/or > arguing :) > > To answer George's question: correct, there's no way to do this generally > with built-in patches. If you make some assumptions (i.e. that the > projection matrix won't change, and that the modelview matrix won't change), > you can do it by manually finding out the matrices "offline", and then > pretending they're constant, but it'll break down in trackballs et. al. where > the constant-matrix requirement no longer holds. > > -- > Christopher Wright > [email protected] > > > _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

