Chapter  9

RenderScript

Introduced in Honeycomb (API level 11), RenderScript is a new framework targeted at high-performance 3D rendering and compute operations. While RenderScript was already used back in Android 2.1 (Éclair), Honeycomb is the first Android version where RenderScript is made publicly available.

After a brief overview of RenderScript, you will learn how to create a simple script and how to use it from your Java application. Then you will learn how to perform rendering operations from your script and how to access your script's data from Java. We will review one of the sample applications provided in the Android SDK, HelloCompute, and compare two implementations of the same application, one based on Honeycomb APIs and the other based on Ice Cream Sandwich (Android 4.0) APIs. To conclude this chapter, we will review the RenderScript header files for both Honeycomb and Ice Cream Sandwich, and the functions you can use in your scripts.

NOTE: This chapter is not meant to be a complete guide to 3D rendering. For example, one should acquire knowledge of the OpenGL Shading Language (GLSL) as well in order to use advanced features of RenderScript. Whole books are dedicated to OpenGL and GLSL, and mastering 3D rendering can take years of practice.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.208.72