How to use a webcam with opengl?!?!

If any knows please tell me.
I want to “take pictures”, and save then in JPEG format, with a webcam.


If you just want to save the pictures there
is no need for OpenGL at all.

Use DirectShow to get the raw image data.
Check out the SampleGrabber (or similar) sample
app that ships with the DirectX SDK.

If you want to use OpenGL for display purposes
just use the image data to create a texture.

But keep in mind:
The image dimensions must be a power of 2.
So stretch the image before feeding OpenGL
with it.
Or use this fancy non-power-of-two-extension
which I never use and forgot the name of.

an example exist in Delphi with DirectShow and OpenGL, check it out on sulaco web page

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.