Advanced graphics and animation
OpenGL ES 2.0
OpenGL® ES 2.0 is now supported with the addition of the GL20 interface defined in the net.rim.device.api.opengles package. The interface is not functional in this Beta release. For more information, see Known issues.
OpenGL ES 2.0 is also supported in the GLField class. Improvements in the GLUtils, and a new set of utility methods are designed to help you use OpenGL ES 1.1 and 2.0.
The GLUtils class is implemented in the net.rim.device.api.opengles package. The following list describes some of the new features now provided.
The VGUtils class provides a set of utility methods that are designed to make it easy for you to use OpenVG™. The VGUtils class is also implemented in the net.rim.device.api.openvg package. The following list describes some of the new features provided by the BlackBerry Java SDK 7.0 version of VGUtils.
- You can create a VGImage from a region of a Bitmap or EncodedImage
- You can load image data from a region of a Bitmap or EncodedImage into a region of a VGImage
- You can create a VGPath from SVG path data
- You can append path segments to a VGPath
- You can use a simpler method to create linear or radial gradient paths
- You can draw text as image glyphs or path glyphs, and control if text glyph outlines are filled, stroked, or both
- You can measure text without drawing it
- You can create text in a VGPath or a VGImage by specifying the text to create and the font to use
Graphics math utilities
Matrix3f and Matrix4f classes in the net.rim.device.api.math package were enhanced with new convenience methods to help you work with and create various types of matrices used by OpenGL ES and OpenVG. Matrix3f.shear() transforms a matrix to incorporate a specified amount of shear along two axes. The new createBillboard(), createLookAt(), createOrthographic(), createPerspective(), and createReflection() methods on Matrix4f, are designed to make it easy to construct matrices you might require when using OpenGL ES.