Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Using OGL For Matrix Calculations

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2001
    Posts
    1

    Using OGL For Matrix Calculations

    I'm using matrices to calculate the rotation of points in my collision engine. I already have a user-defined matrix data type, but I wanted to know if it would be faster or even advisable to use OGL for matrix calculations. I could then copy the OGL matrix over to my own format for use.

    To save some time, I know how to do it (juggling matrices and all), but is it advisable to do so, any adverse effects to rendering?
    "You can't understand stupidity. ...Or at least you shouldn't."

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    601

    Re: Using OGL For Matrix Calculations

    There really is no fast way of reading back transformd vertices from OpenGL. Stick to you own routines for general use, and use OpenGL when you don't need the result.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    Aurora, Illinois, USA
    Posts
    192

    Re: Using OGL For Matrix Calculations

    hmm... I don't know... but, I wouldn't say there is NO possibility... I heard there are tricks to multiplying matrices and stuff... see if you can find any
    Navreet Gill [img]/forum/images/%%GRAEMLIN_URL%%/smile.gif[/img]

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    601

    Re: Using OGL For Matrix Calculations

    The only "trick" I could think of that is hardware accelerated (feedback mode and gluUnProject generally are not) is filling the modelview matrix with vertices, calling glMultMatrix and reading back the result with glGet. However, that means reading from videomem, which is uncached, which is horribly slow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •