extract 4×4 matrix from OpenGL transform matrix?

Apr 18, 2006 at 5:44am

extract 4×4 matrix from OpenGL transform matrix?

Hi -

In jit.gl.sketch, is there any way to extract the current OpenGL modelview matrix as an explicit 4×4 matrix? I’m trying to determine the “absolute” position of an object drawn after the modelview matrix has been through a number of gltranslate, glrotate and glscale transformations.

I know I could figure it out by summing up the various transformations, but this seems redundant, given that OpenGL has done all the work already.

Thanks -

pH

#25483
Apr 19, 2006 at 3:23am

I guess what I’m asking is whether any of the various OpenGL query routines — in this case glGetDoublev() — are exposed in jit.gl.sketch, or if there’s any other way to access them.

- pH

#75099
Apr 19, 2006 at 4:03am

Unfortunately Perry, they aren’t currently. They might happen later
within jit.gl.sketch in immediate mode (forthcoming), however for the
time being you can’t rely on this functionality unless you do it in a
C object.

-Joshua

#75100

You must be logged in to reply to this topic.