1.3. 执行模型 Execution Model

本文介绍了OpenGL的客户端-服务器执行模型,详细解释了应用程序如何通过发送命令来绘制三维几何体和其他图形元素,并探讨了数据绑定及命令处理的顺序。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.3. 执行模型 Execution Model


The OpenGL API is focused on drawing graphics into frame buffer memory and, to a lesser

extent, in reading back values stored in that frame buffer. It is somewhat unique in that its

design includes support for drawing threedimensional geometry (such as points, lines, and

polygons, collectively referred to as PRIMITIVES) as well as for drawing images and bitmaps.

The execution model for OpenGL can be described as client-server. An application program (the

client) issues OpenGL commands that are interpreted and processed by an OpenGL

implementation (the server). The application program and the OpenGL implementation can

execute on a single computer or on two different computers. Some OpenGL state is stored in

the address space of the application (client state), but the majority of it is stored in the address

space of the OpenGL implementation (server state).

OpenGL commands are always processed in the order in which they are received by the server,

although command completion may be delayed due to intermediate operations that cause

OpenGL commands to be buffered. Out-of-order execution of OpenGL commands is not

permitted. This means, for example, that a primitive will not be drawn until the previous

primitive has been completely drawn. This in-order execution also applies to queries of state

and frame buffer read operations. These commands return results that are consistent with

complete execution of all previous commands.

Data binding for OpenGL occurs when commands are issued, not when they are executed. Data

passed to an OpenGL command is interpreted when the command is issued and copied into

OpenGL memory if needed. Subsequent changes to this data by the application have no effect

on the data that is now stored within OpenGL.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值