Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

11. Creating Advanced Graphics > Using RenderScript

Using RenderScript

RenderScript is a language, API, and runtime used to write high-performance code on Android. Introduced in Android 3.0, RenderScript includes both graphics APIs and computing APIs similar to CUDA or OpenCL. It is architecture-independent, so there is no need to customize your code for different CPU or GPU processors. RenderScript optimizes your running code by selecting the appropriate processor and number of cores at runtime. As a fallback, RenderScript will run all operations on the CPU if the appropriate GPU is unavailable. This section covers the basics of using RenderScript with a simple example.


image Note

RenderScript relies on OpenGL ES 2.0 APIs that are not available in the emulator. To run the RenderScript code example, you will need an Android device.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint