Using Qt development project, involve the need to graphics and image fusion, according to the need to display layers: 1. The upper display graphical window with the controls (Qt GUI), the lower the dynamic images of 30 frames per second video (OpenGL); 2. The GUI rendering transparent color, shows the lower video images; 3. Qt GUI need to respond to user interaction (mouse, keyboard, focus), feel this is a common requirement in application development, I've tried several kinds of schemes: 1. The QGLWidget control embedded QWidget control - result: fail, OpenGL internal cannot draw QWidget2. Through QGraphicsView: : setViewport (new QGLWidget), drawing in the QGLWidget dynamic video image, plot in QGraphicsView; - this scheme has certain restrictions on demand, within the scope of the image display only QGraphicsItem, don't show common controls - result: failure, when set to QGraphicsView QGLWidget Viewport, the OpenGL animation above cannot be shown; 3. See dbzhang800 blog, found under the Qt5.0 QWindow can specify QBackingStore, so want to take advantage of QWindow as QWidget container, let plotted on a QWindow QWidget, finally will QBackingStore export: - question 1: QWidget not explicitly as QWindow child objects, feeling all alien QWidget will draw to a native QWidget (QWindow?) , but how to get the native QWidget mapping results? - question 2: found a createWindowContainer QWidget function, to just to pack QWindow QWidget object, original tree species in Qt window, but it does not provide on QWindow QWidget drawing? - question 3: how to get window to refresh the event, and get drawn from QBackingStore results? 4. Qt5.0 provides each platform platform plug-in, to realize the Windows platform QPlatformIntegration plug-in, intercept QWindowsBackingStore: : flush, and dynamic video mixing, but also has such problems as: - question 1: graphics and image need to implement two Windows, graphics need to produce false window (when drawing canvas), the actual superposition of graphics and image fusion after drawing on the OpenGL window (at QPlatformIntegration level identification window seems a bit not be appropriate); - question 2: how to realize the user interaction? Users see the actual image after image superposition of OpenGL window, can operate only this window, how to OpenGL window operating correctly redirected to graphics window? 5. Whether there are other solutions? Ask experts glad,
CodePudding user response:
To tell the truth, didn't understand what you want to say,,, but personal understanding, this is very much like you Qt's own Demo: boxes, ever refer to?
CodePudding user response:
Reference 1 floor rozendew: published in 2013-07-23 and to be honest, didn't understand what you want to say,,, but personal understanding, you are very like this Qt's own Demo: boxes, ever reference,
didn't read also gives good advice, ha ha, thank you very much, I'll study boxes basic demand is on the high frame rate dynamic image display user can control transparent graphics, mainly to ensure performance, performance should satisfy the constraints below image real-time frame can spontaneously and upper graphical user interactive performance: 1. The lower dynamic video frame rate is constant (about 30 frames), a certain size (perhaps can achieve 1280 * 1024); 2. The upper graph may include multiple (a dozen) rectangular window (similar to QWidget) or other special window (similar to QGraphicsItem); I now have to find the right way, with QGraphicsProxyWidget can preliminary implementation, can achieve a certain frame rate (800 * 500 resolution 100 frame/s), but I don't know how to use the hardware acceleration, set up setViewport (new QGLWidget)) after frame rate down instead, also don't know what will be after the upper figure number, ha ha, could you give some advice?
CodePudding user response:
Have you considered using SDL?
CodePudding user response:
Hardware acceleration should be referred to in that you use OpenGL display video, unless the OpenGL code using high version of the OpenGL API (based on OpenGL 2 above), otherwise what seems to have no way to improve the performance,
CodePudding user response:
I wonder whether there are any solution, the original poster 1, if the device supports multiple frambuffer, can use two frambffer, video and GUI use different frambuffer respectively, by the superposition of hardware implementation, 2, you can refer to Gstreamer SDK with examples how to use the Qt play video, modification is ok,
CodePudding user response:
The building Lord solved now