站内搜索: 请输入搜索关键词
当前页面: 图书首页 > MIDP Style Guide for the Java 2 Platform, Micro Edition

MIDP Style Guide for the Java 2 Platform, Micro Edition

[ directory ] Previous Section Next Section

11.1 Offscreen Buffer

Using an offscreen buffer can be part of an application developer's flicker-prevention strategy. Game canvases always provide an offscreen buffer. MIDP implementations provide it, even when the device does not support double buffering. A regular canvas, in contrast, need not have an offscreen buffer. (See Chapter 10 for more information.)

Use the offscreen buffer as the single source for what is rendered on the screen.

MIDP Implementors

Strongly Recommend: graphics/bulb1_icon.gif By default, paint the game screen with the contents of the offscreen buffer.

Application Developers

Strongly Recommend: graphics/bulb1_icon.gif Put your application's initial game-screen content (such as a Splash screen or the initial Game screen) into the offscreen buffer before making the game canvas visible. The offscreen buffer is initially filled with white pixels. If you wait until after the game canvas is made visible to put content into the offscreen buffer, the user will initially see a blank screen. Users could perceive this as a performance problem, or as a broken application.

    [ directory ] Previous Section Next Section