It seems like the browser you are using has JavaScript disabled. As a result, the site will not function properly. We really want you to enable it so you may experience our site as we intended it. If you have no idea what we are talking about or if you need help, visit http://www.enable-javascript.com×
This website uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Find out more on our cookie page.×

Oops, it seems like you're using an old browser that we do not fully support. If you're able to, please upgrade your browser here.×
This website uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Find out more on our cookie page.×

OpenGL
ES

Relationship between OpenGL
ES and EGL

OpenGL is a multi-platform API for rendering 2-D and 3-D graphics. The
API interacts with the GPU to provide rendering of hardware-accelerated graphics.
It's an API that is independent of the windowing and operating systems, and is
network-transparent.

OpenGL
ES is the embedded system version of the OpenGL API, and is used for mobile devices and other embedded
software systems. There are several versions of OpenGL
ES available and each version specification corresponds to an OpenGL version specification. So, OpenGL
ES 1.1 is defined relative to OpenGL 1.5 and OpenGL
ES 2.0 corresponds to OpenGL 2.0 specification. This means that porting code to and from
these two corresponding APIs is simpler than porting code from two non-matching
APIs.

EGL is an interface between OpenGL
ES and the native windowing system. EGL creates rendering surfaces and contexts for OpenGL
ES to draw to. The BlackBerry 10 OS and BlackBerry PlayBook OS both support EGL version 1.4.

Selecting a version that BlackBerry 10 supports

OpenGL
ES 1.1

OpenGL
ES 1.1 uses a fixed-function rendering
pipeline, which allows you to render graphics using traditional lighting
and shading models. It is defined relative to the OpenGL 1.5 specification and is fully
backwards-compatible to OpenGL
ES 1.0. You can configure stages of the pipeline for
specific tasks or disable stages as required.

OpenGL
ES 2.0

OpenGL
ES 2.0 uses a programmable rendering
pipeline, which allows you to create shader and program objects as well
as write vertex and fragment shaders in the OpenGL
ES Shading Language. This implementation uses similar
functions as version 1.1 but does not support the fixed function
transformation and fragment pipeline.

OpenGL
ES 3.0

OpenGL
ES 3.0 also uses a programmable rendering pipeline and adds features and
improvements over version 2.0. These include supporting new buffer
formats and texture features, adding occlusion queries and geometry
instancing, and providing a new version of the OpenGL
ES Shading Language. OpenGL
ES 3.0 is backward compatible with version
2.0.

Only the BlackBerry Z30 smartphone supports OpenGL
ES 3.0.

When you design your application, you need to decide which API
version you want to use: 1.1, 2.0, 3.0, or a combination of versions. When you make
this decision, you should consider the needs of the application and what you're
comfortable with. If your graphical models are simple and do not require anything
fancy, you should consider OpenGL
ES 1.1. Developers who are new to OpenGL may find coding in OpenGL
ES 1.1 faster and more convenient.

OpenGL
ES 2.0 is
more flexible and more powerful than 1.1. Also, the vertex and fragment calculations
in version 2.0 have better performance. However, the OpenGL
ES 2.0 API
is more work up front, such as programming the shaders, and you need to re-create
some of the pipeline that version 1.1 provides by default.

OpenGL
ES 3.0 is the latest version of the API and improves upon 2.0 in
a number of ways. The rendering pipeline has been enhanced to enable acceleration of
visual effects through occlusion queries, transform feedback, and instanced
rendering. ETC2/EAC texture compression is standardized, eliminating the need for
different sets of textures for different platforms. There is also a new version of
the OpenGL
ES Shading Language that supports integer and 32-bit floating
point operations.

Architecture: OpenGL
ES in BlackBerry 10

In BlackBerry 10 OS, OpenGL
ES is leveraged extensively through several development
frameworks, such as the Cascades UI Framework, the BlackBerry 10 WebWorks SDK, and more. We'll take a brief look at how OpenGL
ES is used in each SDK.

The BlackBerry 10 architecture is built on the QNX Neutrino RTOS. The QNX Neutrino RTOS includes a window compositor that performs various
transformations on windows and blends windows together. The compositor is optimized
for BlackBerry 10 and leverages the graphics hardware where ideal.

The WebKit engine powers the BlackBerry WebWorks
SDK and uses both the 2-D and 3-D hardware for rendering. Cascades UI Framework is based on Qt
and exposes a set of C++ APIs for building UIs and animations. It also exposes
various C++ APIs that lets you access platform features. Cascades is based on a client-server architecture and uses OpenGL
ES as its rendering engine. The BlackBerry Runtime for Android apps uses the Skia 2-D engine and OpenGL
ES for rendering and accelerated compositing.

Last modified: 2014-09-30

Got questions about leaving a comment? Get answers from our Disqus FAQ.

1. Choose your focus

This is the focus controller. Use this controller to choose your primary development approach (Cascades or Core).

By selecting a focus, you get to decide what content should be front and center on the site.

2. Download the tools

Before you start developing, you'll need to visit the Downloads tab. Here you'll find downloads for the BlackBerry 10 Native SDK, BlackBerry 10 Device Simulator, and some other useful tools.

3. Try the sample apps

Now featuring a filter control, the Sample apps tab allows you to search for samples by name or by feature.

Select either the Core or Cascades check boxes to display the samples relevant to your focus.

4. Educate yourself

The Documentation tab contains tons of examples, tutorials, and best practices to guide you along the path towards building an awesome app.

The documentation for your preferred focus always appears at the top of the left-hand navigation, but you can still access the rest of the documentation at the bottom.

5. Start developing

The Reference tab is where you'll find essential details about how to use our APIs.

You can use the left-hand navigation to choose how you would like to browse the reference: by module, by topic, or alphabetically. If you have an idea of what you are looking for, start typing it in the Filter box.