Display frame grabber acquisitions

I have to display the acquisitions captured by a frame grabber at 25 frame/second with a resolution of 768x576 pixels.
I know that it is preferable to use texture instead of glDrawPixel, i try to use it but it doesn’t seem to be better.
Perhaps i’m getting wrong something…



to update the texture are u using glTexSubImage2d(…) ie not glteximage2d(…)

In my display function i wrote:

glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 768, 576, GL_LUMINANCE, GL_UNSIGNED_BYTE, pImage);
glTexCoord2f(0, 0); glVertex2f( 0, 0);
glTexCoord2f(0, 576/1024); glVertex2f( 0, 576);
glTexCoord2f(768/1024, 576/1024); glVertex2f(768, 576);
glTexCoord2f(768/1024, 0); glVertex2f(768, 0);

Is that all right?
It takes about 250 msec on a 933MHz Pentium III… amazing!
I’m crying for it…

Have you specified your texture (at initial creation) with internal format GL_LUMINANCE8? Even then, maybe your HW doesn’t natively support this format.

[This message has been edited by zeckensack (edited 02-28-2002).]

Yes, i have! But i tryed with GL_RGBA also and it is the same thing…