Login | Register

Home > Forums > C++ > opengl acceleration ? Page :  1 
opengl acceleration ?
I know how to program in c++ but I dont yet know opengl and I'm wondering of someone can advise me. I am writing a program to read a webcam and show the picture on the screen. Right now it works and has excellent frame rate at its native resolution of 320x240.

But now I want to enlarge it by a factor of 3 from the same 320x240 video signal (/dev/video0). I multiplied everything out by a factor of 3 and it works, but now the frame rate went to crap. It's likely because of all the extra array manipulation that has to be done on the image to expand the pixels out, because I'm reading the same amount of actual data in from the cam.

My question is this: Does OpenGL have anything helpful to offer in terms of really fast 2D array manipulation? I know OpenGL is primarily for 3D, but all I'm doing is 2D and requires no rendering, I just want a better frame rate.

Thanks for your advice. --Mike

You should try assigning the image to a texture. You could then create a textured quad which will fill the entire OpenGL window. Once this has been done, you can then use the tutorial :

which will automatically resize the quad when the window is resized. I'm not sure if this will yield an effective frame rate but you could give it a try.


Home > Forums > C++ > opengl acceleration ? Page :  1 

You need to be logged in to reply to this topic.

All Rights Reserved, © Zeus Communications, Multimedia & Development 2004-2005

Read the Disclaimer