找回密码
 立即注册
收起左侧

Windows版本的Qt 5中OpenGl和ANGLE

1
回复
9848
查看
[复制链接]
累计签到:1568 天
连续签到:1 天
来源: 2013-7-25 16:23:22 显示全部楼层 |阅读模式

马上注册,查看详细内容!注册请先查看:注册须知

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
原文地址:http://qt-project.org/wiki/Qt-5-on-Windows-ANGLE-and-OpenGL


Qt 5 on Windows can be configured to use either OpenGL drivers, or DirectX drivers through the ANGLE library. What you want depends on your use case. The Qt project offers binary installers for both variants.

OpenGL
OpenGL (Open Graphics Library) is a wide spread industry standard [opengl.org] for rendering 2D and 3D computer graphics. It’s the de-facto standard for hardware-accelerated graphics operations on Mac OS X, Linux, and most embedded platforms.
OpenGL ES 2.0 (Open Graphics Library for Embedded Systems) is a stripped-down version of OpenGL for use on embedded systems, which is missing some functions.
The Qt Quick 2 stack in Qt 5 is based on OpenGL, and requires OpenGL 3.0 (alternatively OpenGL 2.x with the framebuffer_object extension) or higher or OpenGL ES 2.0. The Qt OpenGL module [qt-project.org] requires OpenGL 1.3 or later.

OpenGL on Windows
Although Microsoft Windows has native support for OpenGL since quite some time, the supported standard version (version 1 without any drivers installed) is too limited for Qt . Newer versions are generally available through custom graphics drivers, but require users to install them. Also, the quality of the OpenGL support by some drivers is lacking.

ANGLE Project
ANGLE (Almost Native Graphics Layer Engine) is an open source project [code.google.com] by Google. Its aim is to map OpenGL ES 2.0 API calls to DirectX 9 API. A regularly updated version of it is part of qtbase [qt.gitorious.org] .
To compile Qt with ANGLE you have to have a Direct X SDK [msdn.microsoft.com] installed. Starting from Windows Kit 8, this is included in the Windows SDK.
If ANGLE is used in your application, you should ship d3dcompiler_XX.dll along with the Qt libraries. The version string of the D3D shader compiler is pulled from the DirectX SDK header, so make sure to get the same version that ANGLEwas built with (e.g. _43 or _46). This becomes especially important if you configure Qt with -angle-d3d11.
Recommendations

Use Desktop OpenGL if
Your application uses OpenGL calls not part of OpenGL ES 2.0
Your application does not use OpenGL at all (since ANGLE implies additional deployment dependencies which are then not needed).
Your application needs to run on Windows XP. Although it is tempting to use ANGLE as a replacement for missing graphics drivers on this platform, it does not fully work and may lead to crashes, for example, when the security dialog is opened.

Use ANGLE if
You need OpenGL ES features, but not full OpenGL
You have a heterogeneous user base with different Windows versions & graphics cards
You do not want your user to have to install a recent graphics card driver
You want to use the video playback functionality of QtMultimedia (see QTBUG-31800 [bugreports.qt-project.org] )

Further Reading
http://qt-project.org/doc/qt-5.1/qtdoc/requirements-win.html
http://qt-project.org/doc/qt-5.1/qtopengl/qtopengl-index.html
http://blog.qt.digia.com/blog/2012/10/24/graphics-on-windows-from-a-different-angle/
http://blogs.msdn.com/b/chuckw/archive/2012/05/07/hlsl-fxc-and-d3dcompile.aspx

回复

使用道具 举报

尚未签到

2016-3-23 11:14:07 显示全部楼层
谢谢楼主了,楼主辛苦了,呵呵
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了