Results 1 to 5 of 5

Thread: Inverse matrix

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    9

    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

  2. #2
    Senior Member Regular Contributor
    Join Date
    Aug 2003
    Posts
    369

    Re: Inverse matrix

    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:
    Code :
    GLdouble modelviewMatrix[16];
    glGetDoublev(GL_MODELVIEW_MATRIX, modelviewMatrix);
    Same, for projection and texture.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    9

    Re: Inverse matrix

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

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

  4. #4
    Member Contributor uruk's Avatar
    Join Date
    Dec 2004
    Location
    acasa :) sau la munca :(
    Posts
    66

    Re: Inverse matrix

    Check this out. It's from Intel's site and I think you'll find it very interesting.
    Stat rosa pristina nomine, nomina nuda tenemus.

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2002
    Location
    germany
    Posts
    26

    Re: Inverse matrix


Similar Threads

  1. Replies: 3
    Last Post: 04-03-2010, 03:10 PM
  2. Inverse Matrix
    By johnnyp05 in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 08-11-2005, 12:54 AM
  3. matrix inverse
    By powerpad in forum OpenGL: GLSL
    Replies: 2
    Last Post: 06-07-2005, 02:43 AM
  4. inverse MV matrix
    By imported_vince in forum OpenGL: GLSL
    Replies: 5
    Last Post: 05-18-2004, 10:49 AM
  5. inverse matrix
    By DarkFX in forum OpenGL: General
    Replies: 2
    Last Post: 01-08-2004, 03:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean