博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Retained Mode Versus Immediate Mode
阅读量:5940 次
发布时间:2019-06-19

本文共 1513 字,大约阅读时间需要 5 分钟。

ref: https://msdn.microsoft.com/en-us/library/windows/desktop/ff684178(v=vs.85).aspx

Graphics APIs can be divided into retained-mode APIs and immediate-mode APIs. Direct2D is an immediate-mode API. Windows Presentation Foundation (WPF) is an example of a retained-mode API.

A retained-mode API is declarative. The application constructs a scene from graphics primitives, such as shapes and lines. The graphics library stores a model of the scene in memory. To draw a frame, the graphics library transforms the scene into a set of drawing commands. Between frames, the graphics library keeps the scene in memory. To change what is rendered, the application issues a command to update the scene — for example, to add or remove a shape. The library is then responsible for redrawing the scene.

An immediate-mode API is procedural. Each time a new frame is drawn, the application directly issues the drawing commands. The graphics library does not store a scene model between frames. Instead, the application keeps track of the scene.

Retained-mode APIs can be simpler to use, because the API does more of the work for you, such as initialization, state maintenance, and cleanup. On the other hand, they are often less flexible, because the API imposes its own scene model. Also, a retained-mode API can have higher memory requirements, because it needs to provide a general-purpose scene model. With an immediate-mode API, you can implement targeted optimizations.

转载于:https://www.cnblogs.com/Searchor/p/6955555.html

你可能感兴趣的文章
安全狗:云时代的服务器安全守护者
查看>>
Apache Spark 2.0预览: 机器学习模型持久化
查看>>
技术指导实践指南
查看>>
GitHub上的编程语言:JavaScript领衔Java次之
查看>>
微软发布了Spartan项目的细节,并证实了某些流言
查看>>
全面了解大数据“三驾马车”的开源实现
查看>>
.NET Core 2.1预览分层编译特性
查看>>
公有云还能信任吗?Azure遭雷击中断超过一天
查看>>
量子计算竞速时代,如何拨动时间的指针
查看>>
统计php脚本执行时间的php扩展
查看>>
华中科大提出EAT-NAS方法:提升大规模神经模型搜索速度
查看>>
Spring框架5.1将提供对Java 11的支持
查看>>
切勿版本化Web API
查看>>
SpringOne 2017第二日:Juergen Hoeller的演讲
查看>>
Hyperledger Composer评测
查看>>
差分隐私简介
查看>>
Java将弃用finalize()方法?
查看>>
Apache Pulsar中的地域复制,第1篇:概念和功能
查看>>
干净架构在 Web 服务开发中的实践
查看>>
云原生的浪潮下,为什么运维人员适合学习Go语言?
查看>>