The Android Diaries | Getting started with graphics development on Android

Share on linkedin
Share on twitter
Share on facebook
Share on reddit
Share on digg
Share on email

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.

Joe Davis

Joe Davis

Joe Davis leads the PowerVR Graphics developer support team. He and his team support a wide variety of graphics developers including those writing games, middleware, UIs, navigation systems, operating systems and web browsers. Joe regularly attends and presents at developer conferences to help graphics developers get the most out of PowerVR GPUs. You can follow him on Twitter @joedavisdev.

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.

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

Search by Tag

Search by Author

Related blog articles

ParticleSystem screenshot 1

Improving Particle Systems on PowerVR

This article is part of our ongoing series about the PowerVR Performance Recommendations. Today we’ll be focusing on what particle systems are and how they can affect performance, so if you’re interested, why not take a look?

Read More »

Connect

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.

Subscribe to our newsletter

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