官术网_书友最值得收藏!

Immediate mode versus retained mode

Immediate mode is frequently thought of as the opposite of retained mode, but, in practice, when we write code for an immediate mode system, we may build on top of an API that gives us some of the functionality of a retained mode library. Immediate mode forces the developer to do all or most of the heavy lifting done by a retained mode library. We, as developers, are forced to manage our scene graph, and understand what graphical objects we need to render and how and when those objects must render. In short, it is a lot more work, but if done well, the payoff is a game that will render much faster than what is possible to render using the DOM.

You might be asking yourself right now: How do I go about using this Immediate Mode thingy? Enter the HTML5 Canvas! In 2004, Apple Inc. developed the canvas element as an immediate mode display tag for Apple's proprietary browser technology. The canvas partitions off a section of our web page, which allows us to render to that area using immediate mode rendering. That will enable us to render to a part of the DOM (the canvas) without requiring the browser to recalculate the position of all the elements from within the DOM. That allows the browser to optimize the rendering of the canvas further, using the computer's Graphical Processing Unit (GPU).

主站蜘蛛池模板: 黎川县| 越西县| 沅江市| 西平县| 大兴区| 霍邱县| 古蔺县| 佛教| 苏尼特左旗| 家居| 海城市| 新干县| 龙泉市| 衡阳市| 临清市| 特克斯县| 禹州市| 镇平县| 江川县| 额济纳旗| 诸暨市| 汝州市| 缙云县| 惠安县| 南靖县| 刚察县| 普格县| 启东市| 绥滨县| 乐都县| 长沙县| 右玉县| 阿图什市| 丰顺县| 武安市| 屯昌县| 凉城县| 盐津县| 曲周县| 嘉兴市| 上栗县|