fine-grained control in immediate mode. These modes are logical ones
not actual - you don't specify a mode to code in, rather it is implicit from
the way you structure your program.
M3G is not a replacement for non-Java mobile graphics technologies
such OpenGL ES and Direct3D Mobile but rather should be regarded as
a complementary technology. For example, on Symbian OS, the JSR-184
implementation uses the OpenGL ES libraries directly and therefore M3G
automatically benefits from any hardware acceleration chip present on
You can create 3D content programmatically using (a lot) of code but
that is only useful for small applications and demos. To use rich content,
developers usually import the 3D world from a special M3G file. This
is a file format specific to JSR-184 that can hold animations, textures,
cameras, lights, materials, meshes, and so on. A Java ME MIDlet can
include .m3g files in its JAR or download them from a server.
Commercial modeling tools such as 3D Studio come complete with the
option to export a model in M3G format. Unless you are a professional,
you probably won't have access to this, however, there is an open-
source alternative called Blender which you can download for free from
www.blender.org (see Figure 8.8).
Figure 8.8 Exporting to M3G format with Blender
Blender does not include the option to export models in M3G file for-
mat by default, but there is a way around this. Blender supports extension
via Python scripts and one such well-known script ( m3g_export.py ) can
be found online. 10 To get this to work correctly on Windows, you need to
10 Blender Export for J2ME is available from www.nelson-games.de/bl2m3g/default.html .