Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Speed of matrix operations


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Blueshift   Members   -  Reputation: 122

Like
Likes
Like

Posted 05 July 2001 - 08:06 AM

Hello there, I am currently trying to optimize my hierarchical object transformation pipeline. I'm using the typical approach: glPushMatrix() .. .. object specific transformation goes here .. render object .. glPopMatrix() OK, now which one is faster: glPushMatrix() glTranslatef(Object->T.x, Object->T.y, Object->T.z) glRotatef(Object->R.angle, Object->R.x, Object->R.y, Object->R.z) glScalef(Object->S.x, Object->S.y, Object->S.z) ... render it glPopMatrix() or this one: glPushMatrix() glMultMatrix(Object->LocalMatrix) ... render object glPopMatrix() I personally like the second one, it has lower overhead and less memory references, but I read somewhere, that glMultMatrix and glLoadMatrix are quite slow ? And what about the performance of glPushMatrix and glPopMatrix ? I assume that on newer 3d cards with hardwired t&l this should be implemented in hardware and therefore very fast ? Thanks ! A.H aka Blueshift Edited by - Blueshift on July 5, 2001 3:09:15 PM

Sponsor:

#2 mittens   Moderators   -  Reputation: 1315

Like
Likes
Like

Posted 05 July 2001 - 09:11 AM

The glPush* functions aren''t that great on speed to being with ( I was just talking about this with a guy from #flipcode), and there has been much discussion over it at OpenGL.org''s forums. In the end, don''t use the glPush/Pull functions if you don''t have to.

------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials

#3 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 05 July 2001 - 11:49 AM

push/pop matrix isnt so bad
push/pop attrib is very bad though

the loadmatrix version will be the quickest.


http://members.xoom.com/myBollux




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS