Would you like to tell us how we are doing?

You bet No thanks

Sorry about the red box, but we really need you to update your browser. Read this excellent article if you're wondering why we are no longer supporting this browser version. Go to Browse Happy for browser suggestions and how to update.


Choosing the right graphics framework

BlackBerry devices support many graphics frameworks. Before you start doing any graphics programming for BlackBerry devices, it's important that you understand the frameworks that are available to you. By gaining an understanding of these frameworks, you can pick the one that best fits your application programming needs, while also taking into consideration possible future requirements of your application. Making a poor choice at the beginning could result in rework later.

The graphics frameworks supported by BlackBerry devices fall into three categories: hardware-accelerated APIs, web and vector graphics APIs, and canvas graphics APIs.

Hardware-accelerated APIs

OpenGL ES 1.1 and 2.0 and OpenVG are the frameworks in this category. All BlackBerry 7 devices have dedicated graphics hardware. To realize the benefits of that hardware, you should use hardware-accelerated APIs.

You use OpenGL ES to create real-time, accelerated 3-D and 2-D graphics. If you're creating a cutting-edge first-person shooter game, an amazing data visualization app, or a 3-D marker for your augmented reality application, you should be using OpenGL ES.

OpenVG produces hardware-accelerated vector graphics, which are described in the next section.

Web and vector graphics APIs

SVG and OpenVG are the frameworks in this category.

SVG is a good choice if you have existing, static content or web-based content that you need to scale. Although the BlackBerry JDK includes a JSR 226 compliant implementation of SVG Tiny (1.1/1.2), the BrowserField class actually supports SVG 1.1 (full), so we recommend you use that instead.

OpenVG is well suited to programmatically performing immediate mode rendering of dynamic vector graphics. Use OpenVG for graphics and scalable content that must be precisely located, such as a weather overlay or high-quality scaled text in an eBook application.

Canvas graphics APIs

BlackBerry UI graphics and MIDlet LCD graphics are the frameworks in this category.

Canvas graphics APIs provide you with basic 2-D graphic functionality. Because these APIs are limited in functionality and aren't designed to make optimal use of the latest graphics hardware, there are really only two situations when choosing to use canvas graphics is the best choice. The first is if you are overriding the paint() method to customize a UI component. The second is if you are working with legacy code or a MIDlet.

Namespaces of graphics APIs

Graphics API Namespace

OpenGL ES (1.1/2.0)





SVG Tiny


SVG 1.1 (full) / BrowserField


BlackBerry UI graphics


MIDlet LCD graphics