Inverse matrix

Is there a way to get inverse of GL_MODELVIEW_MATRIX? I am certain hardware has to use it at some point, and I can’t believe it has been excluded from the API??

So I am looking for something like glGetFloatv(GL_MODELVIEW_INVERSE_MATRIX) …

I went through RedBook couple times, but I couldn’t find it, am I blind or… ??

Thanks for help in advance :slight_smile:

I’m not putting my hand on fire over this, but I don’t think it exists. Besides, I don’t think it’s that hard to write your own inverse routine. You can get the current matrix with:

GLdouble modelviewMatrix[16];
glGetDoublev(GL_MODELVIEW_MATRIX, modelviewMatrix);

Same, for projection and texture.

It is not hard at all, but finding inverse matrix in general can be quite costly, since it involves lots of multiplications. :frowning:

I just can’t believe it doesen’t exist as part of API. :frowning: ( Oh, well… I guess transposing and translating will have to cut it. :stuck_out_tongue:

Check this out. It’s from Intel’s site and I think you’ll find it very interesting.

Take a look at:

cheating inverse;f=2;t=018093