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

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).

主站蜘蛛池模板: 民和| 沅陵县| 饶河县| 监利县| 深水埗区| 盐亭县| 宁德市| 黔江区| 海伦市| 汉寿县| 博乐市| 尚志市| 光山县| 醴陵市| 华阴市| 中西区| 宁安市| 巨野县| 大城县| 黑龙江省| 大安市| 通榆县| 化德县| 安图县| 镇原县| 白银市| 南郑县| 长沙县| 北票市| 嘉兴市| 万全县| 鸡泽县| 平陆县| 阳曲县| 盈江县| 宾阳县| 沈丘县| 旬邑县| 苍南县| 墨竹工卡县| 颍上县|