GDI / GDI +如何在没有OpenGL或DirectX的情况下工作 [英] How GDI/GDI+ works without OpenGL or DirectX

查看:181
本文介绍了GDI / GDI +如何在没有OpenGL或DirectX的情况下工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起,如果这不在这里。如果是这样的话;请随时将其移至适当的位置。


如何在不使用较低级API与DirectX或OpenGL等GPU通信的情况下,将GDI / GDI +渲染到图形卡(在屏幕上显示内容)?在不使用任何API的情况下如何在屏幕上绘制?是;我知道图像是经过合成并在CPU上渲染的,但是必须先将其SOMEHOW发送到GPU,然后才能在监视器上显示。

Sorry if this is off-topic here. If so; please feel free to move it to the appropriate site.
How does GDI/GDI+ render to the graphics card (display content on the screen) without the use of a lower-level API for communicating with the GPU such as DirectX or OpenGL? How does it draw to the screen without the use of either API? Yes; I know that the image is composited and rendered on the CPU, but then it SOMEHOW has to be sent to the GPU before being displayed on the monitor. How does this work?

推荐答案

GDI原语由视频卡驱动程序实现。视频驱动程序由GPU制造商提供,并使用专有的寄存器级接口与GPU进行通信,在此级别上不需要公共API。

GDI primitives are implemented by the video card driver. The video driver is provided by the GPU manufacturer, and communicates with the GPU using the proprietary register-level interface, no public API needed at this level.

与您的相反声称知道,图像通常不会在CPU上完全渲染和合成。相反,视频驱动程序可以自由使用CPU和GPU处理的任何组合,通常会将大量GDI命令(尤其是位块传输,又名blitting)委派给GPU。

Contrary to what you claim to know, the image is generally not fully rendered and composited on the CPU. Rather, the video driver is free to use any combination of CPU and GPU processing, and usually a large number of GDI commands (especially bit block transfers, aka blitting) are delegated to the GPU.

由于专有接口必须足够强大以支持OpenGL客户端驱动程序和DirectX驱动程序,因此GDI驱动程序可以将命令传递给GPU进行执行也就不足为奇了。

Since the proprietary interface has to be powerful enough to support the OpenGL client driver and DirectX driver, it's no surprise that the GDI driver can pass commands to the GPU for execution.

在启动(和Windows安装)期间,当没有特定制造商的驱动程序可用时,视频API会在软件中执行所有渲染并写入帧缓冲区,即只是提供GPU RAMDAC并映射到CPU地址空间的内存区域。帧缓冲区以几种众所周知的格式(由VESA定义)之一存储。

Early during boot (and Windows install) when no manufacturer-specific driver is available, the video API does perform all rendering in software and writes to the framebuffer, which is just the memory area which feeds the GPU RAMDAC and mapped into the CPU address space. The framebuffer is stored in one of several well-known formats (defined by VESA).

这篇关于GDI / GDI +如何在没有OpenGL或DirectX的情况下工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆