FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Mobile_3D_Graphics_API

Mobile 3D Graphics API

Mobile 3D Graphics API
DeveloperJava Community Process
M3G file format
Filename extension
.m3g
Internet media typeAs of 2007, the latest version of M3G was 1.1, but version 2.0 was drafted as JSR 297 in April 2009. In 2010, M3G 1.1 JNI source code and related Symbian OS Java Runtime Environment were subsequently released into open source through the Symbian Foundation.

Rendering

edit
Screenshot of the Mobile game Asphalt 3: Street Rules, showing the capabilities of the Mobile 3D Graphics API.

M3G is an object-oriented interface consists of 30 classes that can be used to draw complex animated three-dimensional scenes, it provides two ways for developers to draw 3D graphics: immediate mode and retained mode.

In immediate mode, graphics commands are issued directly into the graphics pipeline and the rendering engine executes them immediately. When using this method, the developer must write code that specifically tells the rendering engine what to draw for each animation frame. A camera, and set of lights are also associated with the scene, but is not necessarily part of it. In immediate mode it is possible to display single objects, as well as entire scenes (or worlds, with a camera, lights, and background as parts of the scene).

Retained mode always uses a scene graph that links all geometric objects in the 3D world in a tree structure, and also specifies the camera, lights, and background. Higher-level information about each object—such as its geometric structure, position, and appearance—is retained from frame to frame. In retained mode, data are not serialized by Java's own serialization mechanism. They are optimized by the M3G serialization mechanism, which produces and loads data streams conforming to the .m3g file format specification for 3D model data, including animation data format. This allows developers to create content on desktop computers that can be loaded by M3G on mobile devices.

Further reading

edit