[Lazarus] Fast drawing to canvas

Reimar Grabowski reimgrab at web.de
Thu Feb 23 18:49:38 CET 2012


On Thu, 23 Feb 2012 17:37:04 +0100
Marco van de Voort <marcov at stack.nl> wrote:

> Benchmarking with own code. I had enabled gl3 contexts and PBOs, and I saw
> that that was faster on new machines, but slower on older ones. Old and new
> was mainly videocard. (HD5400 series from ATI vs older GF8500's)
This is not only old vs new it is also ATI vs NVidia and it is only two cards. Nothing wrong with that but I would not draw general conclusions from that.
Enabling PBOs sounds like there is a specific way to use them but there isn't. Using one, two or a pool of PBOs are the options you have for using them for this case and they all should differ in speed (and implementation complexity).
I have not tested this but reliable sources (forum on OpenGL.org) say that how and when you map/unmap the buffer makes a difference, too.
Before mapping the buffer calling glBufferData with null as data may speed up the mapping time.

> I simply measure my frame upload method times, which are zero copy in my own code, thus entirely bound by opengl.
It sounds like you measure OpenGL call blocking time which may or may not be equal to the real upload time. If you use PBOs you most likely map/unmap the buffer in that method, too, which I don't consider upload time. I don't want to question your method just saying that measuring OpenGL times is not as straight forward as it seems to be. That's why NVidia provides a complete SDK (PerfSDK) to measure your OpenGL performance. In the OpenGL world nothing is as easy as it seems.

> so the opengl call blocking time is not entirely the same as the time the card is busy
Of course not. That's how OpenGL works and what makes timing single OpenGL operations difficult.

Nonetheless some interesting info you gave there.

R.








More information about the Lazarus mailing list