Qt+OpenGl+SimpleGl
我已经在ARM平台之一上启用了qt+OpenGl+SimpleGl,并且能够运行opengl示例程序。 我还有一个 qt+Webkit,它正在使用图形插件。
我想对所有事情都使用 simpleGl 上下文,而不是使用普通的图形屏幕。因此,当我尝试使用 simpleGl 运行 Qt+Webkit 时,我只是得到一个空白屏幕。
QT支持这个吗?如果可以的话我们怎样才能做到呢?
I have enabled qt+OpenGl+SimpleGl on one of the ARM platform and was able to run opengl example programs.
I also has a qt+Webkit, which is working with a graphic plugin.
I wanted to use simpleGl context for every thing, instead of using the normal graphic screen. So, when I try to run Qt+Webkit with simpleGl, I just get a blank screen.
Does QT support this? If so how can we make it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,这是正确的。
OpenGL
直接绘制到framebuffer
。simplegl
驱动程序不处理使用QWS
的光栅绘制引擎绘制的内容,因此您可能只能看到黑色。使用
simplegl
表示“所有内容”意味着您希望在EGL
全屏窗口中使用OpenGL
绘制所有内容?在某些假设下这是可能的。您必须编写所有要使用Qt OpenGL 绘图引擎
进行渲染的应用程序(Qt/E
不支持使用 opengl 图形系统)。这对于QtWebKit
也是可能的,我现在正在这样做。请注意,这并不意味着所有内容都是使用硬件加速渲染的。您必须以“正确的方式”编写应用程序才能使所有实际硬件加速。考虑到在这种情况下您必须以其他方式处理鼠标指针。另一种方法是仅修改
simplegl
驱动程序,以允许使用Qt
应用程序使用光栅绘制引擎
。这也是可能的,但有一些限制。Qt
可以使用 blit 将自己的窗口放置在OpenGL
上。在 Qt 源代码树中查找帧缓冲区驱动程序以了解如何执行此操作。然后,您可以通过某种方式拥有常见的Qt
应用程序和OpenGL
Qt
应用程序。我也在做这个。无论如何,并不是所有事情都能完成。编辑:我确信你已经这样做了,但以防万一,请给出这个 http ://doc.qt.io/qt-4.8/qt-embeddedlinux-opengl.html备受关注。
Yes, this is correct.
OpenGL
draws directly to theframebuffer
. Thesimplegl
driver doesn't handle what is drawn using the raster paint engine of theQWS
, so you may see only black.Using
simplegl
for "everything" means you want everything to be drawn usingOpenGL
in yourEGL
full-screen window? This is possible under some assumptions. You have to write all your applications to be rendered using theQt OpenGL paint engine
(using the opengl graphics system is not supported underQt/E
). This is possible also forQtWebKit
, I'm doing it now. Note that this does not mean that everything is rendered using hardware acceleration. You'll have to write your applications "the right way" to get all actually hardware accelerated. Consider that you'll have to handle the mouse pointer some other way in this case.The other way is to just modify the
simplegl
driver to allow for the use ofQt
applications using theraster paint engine
. This is possible as well with some limitations.Qt
can use blit to place its own windows overOpenGL
. Look for the framebuffer driver inside theQt
source tree to know how to do this. You can then have commonQt
applications andOpenGL
Qt
applications some way. I'm doing this as well. Not everything can be done anyway.EDIT: I'm sure you already did, but in case, give this http://doc.qt.io/qt-4.8/qt-embeddedlinux-opengl.html much attention.
不幸的是,我对 SimpleGL 一无所知,但我确实知道有一种方法可以在 QGLWidget 中渲染标准 Qt 小部件。也许看看这个 Qt 季刊,我认为它与您的问题有些相关:
http ://doc.qt.nokia.com/qq/qq26-openglcanvas.html
Unfortunately I don't know anything about SimpleGL, but I do know that there is a way to render a standard Qt widget in a QGLWidget. Maybe have a look at this Qt Quarterly which I think is somewhat related to your question:
http://doc.qt.nokia.com/qq/qq26-openglcanvas.html