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 (@ImaginationTech and @PowerVRInsider) for the latest news and updates from Imagination and the PowerVR Insider developer programme.

Guillem Vinals Gangolells has contributed to this article.

Please leave a comment below

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted. We respect your privacy and will not publish your personal details.

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

Connecting to CES 2019

Attending CES on an annual basis does enable one to make comparisons and get a sense of how technology and trends are progressing. Therefore, as well as meetings and discussions around our recent graphics and AI announcements we took the

AI in the UK: Year in Review

As a company focused heavily on enabling AI processing, it’s important to us that the country where we live is supporting efforts around AI technology development and policy. Indeed, the government, academic institutions, investors, and the entire ecosystem in the

CES 2019 banner

Get some facetime with Imagination at CES 2019

As the holiday season starts to fade to a distant memory the reality of CES is once again looming large our horizons, promising a new flurry of technology announcements to try and make sense of. As the saying goes, what

Lenovo 300e

PowerVR 2018 consumer tech round-up

Before we shut up shop for the year here at Imagination HQ, we thought we take a quick look at some of the end user products that Imagination tech found its way into in 2018. Our IP has appeared in

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.