The Android Diaries | Getting started with graphics development on Android

Since it first hit commercial devices in 2008, the Android Operating System (OS) has gained a significant market share and became one of the main OSes for mobile device manufacturers. A driving factor behind its dominance is the large number of applications available for it. As high-performance, low-power GPUs from Imagination’s PowerVR Series5XT graphics family have become common place in these devices, the demand for efficient, high-quality 3D and 2D graphics in applications has increased.

Android March 2013 distribution

When it comes to writing graphics applications for Android, there are two options to consider; Java and Native(C/C++)

Java

A key strength of Java is its Just-In-Time (JIT) compilation. This feature compiles Java application bytecode into CPU specific instructions on device, which makes Java code extremely portable between platforms that have a Java Virtual Machine (JVM). However, the reliance on the JVM makes it difficult to port the code to devices that do not have a JVM.

Java JIT Android

Java is the primary language for Android development. The Android SDK contains a wide array of tools that enable developers to quickly and easily develop, debug and profile applications written in Java.

You can find out more about the Android SDK here: https://developer.android.com/sdk/index.html

Native(C/C++)

Although C/C++ code has to be compiled for specific CPU architectures, almost all devices available to developers have compilers for these native languages. This makes C/C++ code extremely portable between devices and OSs.

To complement the Android SDK, Google provide the NDK for compiling C/C++ code.

Android NDK app

You can find out more about native development on Android here: https://developer.android.com/tools/sdk/ndk/overview.html

Writing your first Android graphics application

We’ve covered programming languages, so the next question becomes – how can I write an application that utilizes the GPU for my 3D rendering?

To enable developers, Android devices include drivers for the Khronos OpenGL ES graphics APIs. These APIs allow developers to construct a 3D scene and issue rendering work to the GPU (https://www.khronos.org/registry/gles/).

As you may be realising, the world of 3D graphics programming can be a little daunting… Fortunately, we’re here to help with the PowerVR Graphics SDK!

Since its v3.0 release in September 2012, the PowerVR SDK has been downloaded from over 65,000 unique IP addresses, with a majority of users choosing Windows as their development of choice.

The PowerVR Graphics SDK v3.0 supports the most recent versions of the OpenGL ES API, including 1.1, 2.0 and 3.0. In terms of cores, we’ve added the PowerVR G6200 and G6400 Series6 IP cores to the list, alongside the already well-known Series5 and Series5XT families. A breakdown of each tool, what’s been updated and what’s new can be found here.

PowerVR Graphics SDK v3.0

January 2013 saw the release of the PowerVR Graphics SDK v3.0 r2, bringing native support for the BlackBerry 10 operating system as well as seamless integration with Android’s SDK Manager tool. We expect PowerVR Insiders to start taking advantage of these new additions, giving them the possibility to port applications between operating systems more easily as well as help them work faster and more reliably.

The Android Diaries’ is a series of blog posts, articles and tutorials where we focus on all aspects of graphics development on Android, the Android SDK as well as Android-specific APIs like Renderscript or Filterscript. If you have any Android-related questions, ideas or suggestions, please leave a comment in the box below or start a discussion on our PowerVR-dedicated forum and we will get back to you as soon as possible. Make sure you also follow us on Twitter (@ImaginationPR and @PowerVRInsider) for the latest news and updates from Imagination and the PowerVR Insider developer programme.

Guillem Vinals Gangolells has contributed to this article.

Search by Tag

Search for posts by tag.

Search by Author

Search for posts by one of our authors.

Featured posts
Popular posts

Blog Contact

If you have any enquiries regarding any of our blog posts, please contact:

United Kingdom

benny.har-even@imgtec.com
Tel: +44 (0)1923 260 511

Related blog articles

PowerVR in silicon: Vivo Y83 smartphone review

If you were watching the World Cup earlier this year and for some reason weren’t gripped by what you were seeing you may have noticed the brand ‘Vivo’ on the advertising hoardings running down the sides of the pitches. I’d

Imagination at Smart China Expo panel

Imagination focuses on artificial intelligence at Smart China Expo

On August 23rd-25th 2018, the first Smart China Expo was held in Chongqing, China and attracted more than 400 attendees from all over the country. The event was jointly organized by a variety of organisations; the Chongqing Municipal People’s Government;

Stay up-to-date with Imagination

Sign up to receive the latest news and product updates from Imagination straight to your inbox.

  • This field is for validation purposes and should be left unchanged.
>
Contact Us

Contact Us