OpenGL - 客户端-服务器架构相对较慢,不是吗?

OpenGL - Client-server architecture is relatively slower, isn't it?

引用:

In the client–server model, the commands issued by the client do not necessarily get sent to the server immediately. If the client and server are over a network, it will be very inefficient to send individual commands over the network. Instead, the commands can be buffered on the client side and then issued to the server at a later point in time. As a result, there needs to be a mechanism that lets the client know when the server has completed execution of previously submitted commands.

OpenGL®ES 2.0 编程指南 - Aaftab Munshi、Dan Ginsburg、Dave Shreiner

另一方面,实施了 OpenGL 错误报告机制 (glGetError) 和其他内容,以便实施最少的检查以实现最佳性能。

如果不是客户端-服务器(独立的?),客户端-服务器架构不是相对较慢吗?使用客户端-服务器架构在不同的机器上工作真的值得吗?

虽然 OpenGL 旨在实现客户端-服务器实现,但特定的实现可以自由地以直接渲染方式实现事物,即 OpenGL 调用立即执行或几乎没有延迟。

但是必须明确指出,客户端-服务器架构并不意味着性能损失。事实上,OpenGL 的异步执行模型在如何执行操作的细节上允许实现有很大的回旋余地,以至于通过在内部重新安排操作的顺序,可以获得比直接按顺序执行更好的吞吐量。唯一的要求是,操作的结果必须与那些操作的结果相匹配,就好像事情是按顺序执行的一样。但这与现代 CPU 上的乱序执行没有什么不同。

On the other hand, OpenGL error reporting mechanism (glGetError) and other things are implemented so that minimal checks are implemented in order to achieve maximal performance.

好吧,实际上 OpenGL 需要大量内部错误检查和验证(这是 Vulkan 解决的问题之一,允许在发布版本中禁用或删除此错误检查和验证)。所以你这个说法是不准确的。