View Full Version : Display frame grabber acquisitions
02-19-2002, 06:20 AM
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(..)
02-28-2002, 03:32 AM
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... http://www.opengl.org/discussion_boards/ubb/confused.gif
02-28-2002, 04:20 PM
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).]
02-28-2002, 10:10 PM
Yes, i have! But i tryed with GL_RGBA also and it is the same thing...
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.