您的位置:首页 > 运维架构

OpenGL与XServer系列:EGL/GLX/Xegl/XGL/XGLX

2009-11-30 13:23 369 查看
Linux的图形系统真是复杂到深不可测,我很怀疑是否大学可以开个课程,用一个学期来讲清楚。例如,最近看资料看到的EGL/GLX/Xegl/XGL/XGLX,感觉是字母G、E、L、X几个字母在排列组合,绕着绕着有些发晕。

从EGL说起,EGL是什么呢?en.wikipedia.org上说:

EGL (Embedded-System Graphics Library) "

is an interface between
Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying
native platform window system. It handles graphics context management,
surface/buffer binding, and rendering synchronization and enables
high-performance, accelerated, mixed-mode 2D and 3D rendering using
other Khronos APIs.

"


www.freedesktop.org上说:

EGL is an extension to OpenGL
that was originally designed for embedded system use. EGL replaces
GLX/AGL/WGL with a platform independent implementation. Don't confuse
the EGL specification with Xegl which is the Linux implementation of
the EGL specification. EGL is platform independent, Xegl is not.



常感谢这段话,终于把EGL/GLX/Xegl三个名词都说清楚了。我现在非常怕名词缩写,我相信每个所写背后还是有理念的,只是无法穷尽精力去弄明白。
“吾生有崖,而知无崖,以有崖求无崖,殆哉矣” 。话说这三个词真的有点绕:GLX是X Window System的OpenGL扩展
(initialism for "OpenGL Extension to the X Window System") ,EGL是OpenGL
ES/OpenVG与平台本地窗口连接层,但是EGL是平台独立的。而Xegl呢,却是EGL在Linux上的实现。要理解得彻底,还需要引入一个名词:
XGL。


Xgl
is an
X server
architecture designed to take advantage of modern graphics cards via their
OpenGL
drivers, layered on top of
OpenGL
via
glitz
.上述引自wikipedia.org,XGL是一种Xserver的架构其设计目的是通过OpenGL驱动充分利用现代显卡的性能,
XGL通过Glitz使用OpenGL。
后半句提到了Glitz,
Glitz是什么呢?是OpenGL的封装类库,Glitz不仅精确实现了X Render extension的规范,还扩展了额外的功能。从架构上说,个人觉得Glitz不应该是XGL的必要条件(XGLX就没有用到Glitz)。

freedesktop.org认为:Xegl
is a new server based on the Xgl architecture.
Xegl是一种XGL架构的实现。
然而,在Xegl作为XGL的终极目标实现之前,XGLX提供了XGL的另一种实现,然而XGLX备受争议,NVidia
这家公司明白的表示这样的XGLX发展的方向是一个错误的方向,因为该方案中XGL的后端竟然只是一个次级的OpenGL视窗(layared
server)而不是一个独立的个体(like X
server)。这句话理解起来太艰难,我找到了黄敬群大牛的PPT中的一张图,来说明XGLX的结构。






作为对比,看看Xegl实现的XGL架构,图片同样来自黄敬群大牛的PPT图片同样来自:



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: