How to implement a (web) camera using openGL


I want to create an application (C++) that contains a live stream to my webcam that is connected to the same computer.
I know that there is a way to realize this using DirectX, but my application needs to be platform-independent, so I think OpenGL would be better.

Can anyone help me, please.

Kind regards

OpenGL is a library for drawing graphics, it has no means to read images from a webcam. I suggest you look for some open-source webcam libraries (there should be some, I imagine).

You could have a look at, but this is a very new API and compatible webcam drivers may not be available yet.

Openml probably would be hart to use.
I was looking for open-source webcam libraries, but i did not really find anything that could help me.

There must be anyone out there who has had the same problem and who does not want to use DirectX…

Apart from OpenML i don’t know any cross-platform video capture API…

you should check out openframeworks. i am sure you can rip out a lot concering framegrabbing. it uses directshow or quicktime on windows, quicktime for mac, video4linux on linux (via compile-time-switches)

openframeworks looks pretty useful. i will try.
thank you very much!

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