PBO slower than glTexSubImage2D() ???
I would like to stream video frames from an avi to an opengl texture as fast as possible. So I wrote four little programs that load repeatedly a texture with different method :
- with teximage2D
- with texSubImage2D
- with one PBO
- with two PBO loaded alternately
For a 640*480 texture here is the corresponding fps values :
- texImage2D : fps = 51 (loading is slower because the texture is not power of 2)
- texSubImage2D : fps = 72
- one PBO : fps = 68
- two PBO : fps = 67
Where can be the problem ? My driver implement a fake pixel buffer extension ? (my graphic card is a Intel N10 from an asus eeepc )
I join the source code (benchmark.zip).
Re: PBO slower than glTexSubImage2D() ???
Most likely a fake extension that's actually software emulated.
For glTexSubImage2D on Intel you really need to be using GL_BGRA/GL_UNSIGNED_INT_8_8_8_8_REV, but I guess that if you're getting 72 FPS it's already fast enough.