Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualnoizex

Posted 19 March 2013 - 06:34 PM

First off, these two options are not equal, at least in terms of the source code you pasted. First one also calculates perspective projection and lookat - both which can be calculated lazily and only when certain parameters change. If you do this every frame then its one thing thats wrong. In second example you don't even mention lookat or perspective matrix - where are these calculations? 

 

The way you measure it is also wrong, as you said you're using frames/s and you should be using ms/frame. 

 

Using proper matrices and sending them as uniforms (or UBO) is the right way. Plus, as you mentioned, use of glRotate and similar calls is deprecated, and thats perfect reason not to use that kind of code.


#1noizex

Posted 19 March 2013 - 06:34 PM

First off, these two options are not equal, at least in terms of the source code you pasted. First one also calculates perspective projection and lookat - both which can be calculated lazily and only when certain parameters change. If you do this every frame then its one thing thats wrong. In second example you don't even mention lookat or perspective matrix - where are these calculations? 

 

The way you measure it is also wrong, as you said you're using frames/s and you should be using ms/frame. 

 

Using proper matrices and sending them as uniforms is the right way, as you already mentioned, use of glRotate and similar calls is deprecated, and thats perfect reason not to use that kind of code.


PARTNERS