Mobile3DWorld News Games Forums Blogs Store Reviews FreeZone GameIdeas DevZone Companies
 
Thursday, July 03, 2008
Advertisement
Minimize
DevZone Repository
Minimize
Search

JOGL-ES Sample

With the release of the Java Wireless Toolkit (WTK) 2.5, developers now have two 3D APIs to play with in their MIDlets -- the familiar M3G (also known as Mobile 3D, and JSR-184), and a new Java binding for the OpenGL ES API (JSR-239). The new API doesn't have an official nickname or abbreviation, but I'll be using the name JOGL-ES.

I examined M3G at some length in a series of chapters available at the Killer Game Programming in Java website. Starting with this chapter, I'll run through the basics of programming with JOGL-ES.

I'll begin by describing a basic programming framework for utilizing JOGL-ES inside a MIDlet. It's essentially an animation loop inside a thread, which repeatedly updates the application's state, renders the 3D scene, and perhaps sleeps for a while so that the animation maintains the desired frame rate. This chapter's example also shows how to:

  • initialize JOGL-ES inside a GameCanvas instance;
  • create a 3D textured floor;
  • create rotating textured cubes;
  • mix 3D and 2D rendering (for drawing 2D textual overlays at the front of the 3D scene);
  • control a moveable camera with keypresses. The camera can translate forward, backward, left, right, up, and down, and rotate around the x- and y- axes;
  • utilize lighting;
  • shutdown JOGL-ES at termination time.

The screenshot at the top of the page shows the application running. The two textured cubes continuously rotate around the y-axis; the one with the brick texture is centered at the origin, while the wooden cube orbits a short distance from the y-axis. A cube's texture is repeated on each of its faces.

The floor is covered in a grid image with x- and z- axes.

The text at the top of the display is drawn by 2D commands after the 3D scene has been rendered. The red text on the left-hand side shows positional, rotational, and mode information for the camera, and the black number on the right is how long the execution of the current frame took to complete in milliseconds.

From Pro Java 6 3D Game Development : http://fivedots.coe.psu.ac.th/~ad/jg2/



File size 442 K
Downloads 2
Date Fri 03/28/2008 @ 07:08
Author Thanh Nguyen
EMail
RATING:   COMMENTS (0)  DOWNLOAD

Developing 3D Applications For Mobile Devices
Introduction
With the progress of processing power and video cards, the amount of data processed in a 3D scene grows each day, the sophistication of graphic performance is even better in every platform.
Even with all that power, real time applications, like 3D games, make a lot of mathematical calculations to create multiples images per second to offer a good user experience. Since time and processing are limited, all aspects which make a 3D scene (geometry, animations, lighting), as the algorithms, should be highly optimized to make this task possible.


File size 736 K
Downloads 8
Date Sat 01/26/2008 @ 11:33
Author Administrator Account
EMail
RATING:   COMMENTS (0)  DOWNLOAD

Evaluation of Java 3D for mobile platforms
Project description
This master’s thesis primary objective is to investigate the level of 3D complexity that is possible in games and other applications on a state of the art mobile telephone using the JSR-184 specification of Java 3D. Further it will investigate how this compares to the usage of Java 3D as it is implemented in the optional package for J2SE. To achieve this objective a Java 3D game will be implemented for both platforms.
The project is done as a master thesis at the Department of Computer Science at Lund Institute of Technology.


File size 653 K
Downloads 9
Date Sat 01/26/2008 @ 11:33
Author Administrator Account
EMail
RATING:   COMMENTS (0)  DOWNLOAD

< BACK  1 of 1  NEXT >
Information To Developers
Minimize
Mobile 3D developers are welcome to upload Mobile 3D tips and tricks, articles and code samples to share with the community.
Repository Latest Uploads
Minimize
Mobile3DWorld News Games Forums Blogs Store Reviews FreeZone GameIdeas DevZone Companies