You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
al-sabr
changed the title
How to adapt native OpenGL code with native Camera capture.
How to adapt native OpenGL code with native Camera capture to Magnum, ImGui, MagnumGL.
Mar 22, 2019
Well, I already listed the high-level concepts for you in mosra/magnum#327. All you need to do is:
try out a few different examples, so you get the idea how rendering works, how textures work, how input events work, how to loop and display different things each frame, etc.
that will probably imply that you need to read up on basic GPU programming concepts, how is the memory management there, what is a buffer, what is a mesh, what is a texture, what is a framebuffer, what does a shader do etc.
then, read up on the APIs I referenced
after you're a bit more sure about what you are doing, you can try displaying a single frame (load a PNG, for example) via a texture passed to ImGui
then, the final step is cutting out just the camera-related stuff from the above snippet and getting some RGB(A) image out of it, which you use instead of the stationary image in the previous step. And you throw everything else from the above snippet away -- it's using old GL 1.1 and is full of other very bad practices.
That's it, I'm sorry but I can't help you any further. My free time is quite limited and I have to prioritize what I spend my time on, so rewriting the above snippet with Magnum is absolutely out of question (besides that, I'm not on Windows and I have zero experience with their camera APIs).
Moreover, if you have no prior experience with OpenGL, giving you a ready-made thing wouldn't help you much anyway, since both this and the magnum version would be equivalently opaque pieces of code that "does something", but you'll have no idea why and how either way.
Again, as I mentioned in mosra/magnum#327, for general discussion the Gitter channel is the preferred form of communication.
"give a man a fish and you feed him for a day;" ... you know the rest.
Greeting @mosra I found an amazing code which wraps Camera capture and there is an example with OpenGL displaying the raw data coming from the camera.
Since I don't know yet how to integrate OpenGL, Magnum, and display all of above inside of ImGui I'm wondering if you can give me some guidance.
This is the original code : https://www.codeproject.com/Articles/776058/Capturing-Live-video-from-Web-camera-on-Windows-an`
The part which interests me is Update on VS2013Express for Desktop
How do I need to think to be able to adapt that code for ImGui, Magnum, OpeGL Wrapper and camera capture?
Thank you for your suggestion.
The text was updated successfully, but these errors were encountered: