Answer the question
In order to leave comments, you need to log in
Image Mixing in Qt: Should You Use OpenGL?
I have a simple Qt 5 program that receives images from different sources and overlays them on the background image, scaling them along the way. The result is further processed. Frequency 30 fps.
Now I do everything through QImage & Painter: I stupidly draw each picture into the same painter by calling drawImage.
Does it make sense to move this mixing to OpenGL, will there be a performance gain... And how to do it?
Thanks in advance for your replies!
Answer the question
In order to leave comments, you need to log in
There will be a performance gain, that's for sure.
As an option, you can do this:
1. Make a simple square plane (the size is not the main thing, you just need to set the camera correctly).
2. We make a shader that will mix our images for us (according to my assumptions, it will be very simple :))
3. Draw our plane using a shader.
4. Done.
As far as I can tell from the question, you haven't worked much with OpenGL. It may seem very difficult for you, but I advise you to try, such an experience is worth a lot ...
UPD. I remembered about QML there, on the one hand, this matter will be simplified a little (OpenGL + shader), and on the other hand, it will become more complicated if you have not used QML before.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question