当前位置: 技术问答>linux和unix
请熟悉Linux内核的人给大家讲讲什么是FrameBuffer,以及它的由来。
来源: 互联网 发布时间:2015-09-07
本文导语: 如果再讲讲DirectFB的故事那就更好了。 | XFree86 currently accesses your hardware directly, essentially bypassing the kernel. Historically, this is because Linux, BSD, and other unix systems never had their own video...
如果再讲讲DirectFB的故事那就更好了。
|
XFree86 currently accesses your hardware directly, essentially bypassing the kernel. Historically, this is because Linux, BSD, and other unix systems never had their own video drivers.
However, as Linux modernized, it now has video drivers, otherwise known as the "Linux Framebuffer." The idea is really cool. You can insmod / rmmod a video driver, just like any other Linux driver, and the video device is /dev/fb0 (and so on) just like any other device. Unfortunately, the Linux Framebuffer is severely underused, and so many cards are unsupported and the drivers are not very optimized. In contrast, XFree86's drivers are a lot more mature.
DirectFB is an API that layers over the Linux Framebuffer. It's sorta like DirectX, in that there is a HAL/HEL system (if your card doesn't support a certain feature, for instance such as alphablending, DirectFB will do it in software for you). However, DirectFB is not intended for just games, like DirectX often is reserved for.
Oh, and before anyone says that DirectFB is an X replacement, let me remind you:
* XFree86 = graphics layer + 100 other important things
* DirectFB = graphics layer
Personally, I'd just like to see DirectFB used as a replacement for the XFree86 graphics layer. In fact, you can already do this with XDirectFB (it's a port of XFree86 to DirectFB).
However, as Linux modernized, it now has video drivers, otherwise known as the "Linux Framebuffer." The idea is really cool. You can insmod / rmmod a video driver, just like any other Linux driver, and the video device is /dev/fb0 (and so on) just like any other device. Unfortunately, the Linux Framebuffer is severely underused, and so many cards are unsupported and the drivers are not very optimized. In contrast, XFree86's drivers are a lot more mature.
DirectFB is an API that layers over the Linux Framebuffer. It's sorta like DirectX, in that there is a HAL/HEL system (if your card doesn't support a certain feature, for instance such as alphablending, DirectFB will do it in software for you). However, DirectFB is not intended for just games, like DirectX often is reserved for.
Oh, and before anyone says that DirectFB is an X replacement, let me remind you:
* XFree86 = graphics layer + 100 other important things
* DirectFB = graphics layer
Personally, I'd just like to see DirectFB used as a replacement for the XFree86 graphics layer. In fact, you can already do this with XDirectFB (it's a port of XFree86 to DirectFB).
|
framebuffer确实如你所说,(是对图形设备的一个提取/抽象。它把一些视频设备描绘成一个
缓冲区,允许应用通过frame buffer所定义的良好接口访问图形设备,这样应用也就不需要关系具体的硬件细节了),但framebuffer仅仅只是提供简单的抽象而已,要自己做应用,还是麻烦
directfb是跟window下的directx类似的一套库,你想在上面建立自己的gui,还是有点困难的的,
特别是如果你想有效的管理窗口之类的东西。
现在不是有基于directfb的gtk和qt嘛,可以尝试一下。
另外,directfb不是对每个显卡都支持的,其支持的类型十分有限,如果不支持,那么,
就只能做软件模拟,其效率就……
很可能你得根据自己的显卡类型自己做扩充……
缓冲区,允许应用通过frame buffer所定义的良好接口访问图形设备,这样应用也就不需要关系具体的硬件细节了),但framebuffer仅仅只是提供简单的抽象而已,要自己做应用,还是麻烦
directfb是跟window下的directx类似的一套库,你想在上面建立自己的gui,还是有点困难的的,
特别是如果你想有效的管理窗口之类的东西。
现在不是有基于directfb的gtk和qt嘛,可以尝试一下。
另外,directfb不是对每个显卡都支持的,其支持的类型十分有限,如果不支持,那么,
就只能做软件模拟,其效率就……
很可能你得根据自己的显卡类型自己做扩充……
|
在某重程度上google就是最好的老师
|
同意,google。