The Android Diaries | The PowerVR Graphics SDK for the Android OS

The PowerVR Graphics SDK is a cross-platform toolkit written in C/C++, designed to support all aspects of 3D graphics development and enable users to get the most out of the graphics acceleration hardware available to them. It runs on a wide range of devices, but is primarily written and optimized for those that contain PowerVR GPUs.

The SDK consists of two key components; thorough documentation to guide developers, and a wealth of source code including highly optimized example applications, a cross-platform abstraction framework, and helper libraries for commonly used functionality.

PowerVR Graphics SDK v3.1

The PowerVR Graphics SDK is provided for Windows, OS X and Linux, and can target a variety of operating systems (including Android, iOS and PC emulation on your development machine).

C++ on Android…I thought I could only use Java?

The PowerVR Graphics SDK is written in C++ as it is the language favoured by developers for high-performance, cross-platform applications. Although we do not provide a Java version of the SDK, the source code is very straightforward and well commented. The concepts and techniques are important here – not the language they’re implemented in.

Building a C++ application for Android using the Android NDK and SDK consists of two stages; generating the native (C/C++) library and then building the wrapper around it.

Native code is built into one dynamic library (.so) file per CPU architecture that is being targeted. Once the native code libraries have been built, the Java wrapper layer can then be automatically generated by the Android SDK build. The result of this second build stage is an APK package containing your native .so libraries, the Java wrapper and any assets that were included in your Android project directory (e.g. textures, shaders etc). If the APK contains native libraries for a variety of CPU architectures, the Java code will pick the correct one for the current device at run-time.

How can I get the PowerVR Graphics SDK for Android?

There are two versions of our PowerVR Graphics SDK v3.1 for Android; the first is a standalone variant designed to integrate into the Eclipse IDE (Option 1), and the second is better suited to developers that are targeting multiple operating systems and don’t mind using the command-line (Option 2). The choice between the two is down to personal preference – if you would prefer to use an IDE to manage your projects and debug applications, then Option 1 is the way to go.

Pre-requisites

In addition to the PowerVR Graphics SDK, you will also need the Android NDK and the Android SDK (or Apache ANT) to build and deploy to Android devices. For the Eclipse SDK, you will also need the Android Eclipse add-in. These packages can be downloaded from the following locations:

Downloading

Option 1: A recent addition to our offering is our Android SDK Manager add-in. This variant of our SDK is designed for Eclipse IDE integration. You can download the SDK by following these simple steps:

  1. Open the Android SDK Manager
  2. Open the Tools–>Manage Add-on Sites window and click the User Defined Sites tab
  3. Click to New… and add the following URL: https://www.imgtec.com/developers/powervr-sdk-tools/installers//androidsdk.xml
  4. The PowerVR SDK should now appear on the Packages list (Under API 10). There is a package per graphics API. We recommend the OpenGL ES 2.0 API for current devices as it is widely supported and is much more flexible than OpenGL ES 1.x.

Android SDK Manager - Add-on Sites _014

Option 2: Alternatively, you can get the SDK by registering as a PowerVR Insider and then downloading the installer for your development machine (Windows, OSX or Linux). During the simple installation process, you then need to select Android as your target OS and choose your desired graphics API/s (OpenGL ES 1.x, 2.0 and 3.0). We recommend the OpenGL ES 2.0 API for current devices as it is widely supported and is much more flexible than OpenGL ES 1.x.

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.

  • I use Android NDK in Eclipse Juno on Windows 7. The NDK samples run just fine.
    However with PowerVR, I’m always getting this message during the build of 01_HelloAPI (ogles 2.0):
    build-binary.mk:348: *** target pattern contains no `%’
    Some posts suggest to use make.exe v3.80. This fixes the build error, but the app crashes anyway because the *.so library is never built.
    What is the correct way to build and run the PoverVR samples?

  • 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

    British Engineering Excellence Award

    PowerVR Vision & AI design team collect another award

    We’re delighted that the design team for our PowerVR Series2NX Neural Network Accelerator (NNA) has been honoured with a prestigious British Engineering Excellence Award (BEEA). The BEEAs were established in 2009 to demonstrate the high calibre of engineering design and innovation in the

    Series8XT AR/VR Banner

    Imagination Technologies: the ray tracing pioneers

    After a period out of the spotlight, ray tracing technology has recently come back into focus, taking up a lot of column inches in the tech press. The primary reason is because graphics cards for the PC gaming market have

    Amazon Fire Stick 4K pic

    Amazon Lights up its Fire TV Stick 4K with PowerVR

    Amazon, the internet shopping giant, announced earlier this week the latest version of its media streaming device, the Fire TV Stick 4K. First released in 2016, the Fire TV stick brings catch-up streaming services to any TV with an HDMI

    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