Benchmarking

Has anyone benchmarked all of the openGL functions. I wonder when coding how fast different function like glTranslate, scale, loadidentity, push pop matrix, get matrix, set projection, etc. take speed wise. If there is a website that has this, could someone point me in the right direction.

As always with hardware acceleration, it’s very hard to benchmark individual calls, and the order of calls will make a difference.
For example, if you do many matrix operations, the driver may concatenate them then send only one command to the gfx card.
So the results will depend on the exact hardware/driver used. And don’t forget that some card are very fast at some things and very slow at others.

The slower will always be when you ask the gfx card (glQuery etc).

So the most precise way is to implement what you want to benchmark, test it, optimize it, retest, and keep older version if it was faster…

Hey, well even information like you just provided is useful? What sites are dedicated to giving information about how to optimize openGL even if it is more General like this?

I just googled for “opengl performance” and I got some material, a bit old, but you will get the basics :
http://www.opengl.org/resources/faq/technical/performance.htm
http://www.mesa3d.org/brianp/sig97/perfopt.htm

a tool to evaluate GL perfs (not tested) : http://glean.sourceforge.net/

And again some general stuff : use VertexBufferObjects (VBO) if you got a lot of geometry, limit context switches and state changes, never use glFlush , limit uses of glFinish where it is absolutely needed (and not once per frame i.e.), send data to the card in a format that does not require conversion by the driver, do not use too many GL_LIGHTs.

And when you benchmark, don’t forget to disable vsync, else you will get inacurate results. FRAPS is usable to let you see FPS in any GL application. http://www.fraps.com/downloads.htm
version 19 works very well for that.
There is also glTrace which logs every GL call: http://www.hawksoft.com/download/

A last advice, leech around the openGL advanced programming forum, and search for ‘perf’ or ‘performance’, you will get a lot of info.

And use google of course…

[This message has been edited by ZbuffeR (edited 12-05-2003).]

I was wandering around on your website, and a saw VidTrack V1.1, which seems quite interesting. Would you mind making it available online ?

And to continue on GL perf, you go to ATI and NVidia’s developer sites, they have many papers that describe how to use their hardware to the max : http://developer.nvidia.com/page/home http://www.ati.com/developer/index.html