Quote Originally Posted by Lele
I'm trying to understand the best way to do such a 2d display,
your use of glDrawPixels is interesting and very fast, and most of all doesn't need to have width and heigh power of 2.
But unfortunately it seems to work differently than other OpenGL rendering, so it's not possible to zoom or resize like when using Texture.
actually it is possible to use the zoom capability. check the QT documentation:

void QGLWidget::resizeGL ( int width, int height ) [virtual protected]
This virtual function is called whenever the widget has been resized. The new size is passed in width and height. Reimplement it in a subclass.
There is no need to call makeCurrent() because this has already been done when this function is called.

Quote Originally Posted by Lele
So now I'm using
gluBuild2DMipmaps( GL_TEXTURE_2D, 3, width, height,
GL_RGB, GL_UNSIGNED_BYTE, data );

and it's ok even because it automatically resize the width and heigh to be power of 2, but it's very slow if you do that at every frame
re-implement resizeGL(newWidth,newHeight), and it should be ok.
Quote Originally Posted by Lele
So I just wanted to know if you're using drawpixel for showing a buffer without working on it (zoom, resize, overlays) or it was just a test.

thanks
there are different ways to do (zoom, resize, overlays), like some stuff could be easily done as QImage then you convert that to openGL and do some other stuff and so on..

my inetntion of the test was to find the fastest way of rendering video frames (image sequences) after processing them, e.i. to find the fastest way of displaying the images.