O'Reilly logo

Cardboard VR Projects for Android by Matt Schoen, Jonathan Linowes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating the RenderBox library

With the Solar System project implemented and our code stabilized, you might realize that we've built some code that is not necessarily specific to this application, which can be reused in other projects, and ought to make its way back to the RenderBox library. That's what we'll do now.

We recommend you do this directly within Android Studio, selecting and copying from this project's hierarchy view to the other's. Perform the following steps:

  1. Move all the .shader files from the Solar System's res/raw/ directory into the res/raw/ directory of the RenderBox lib's RenderBox module. If you've been following along, there will be eight files for the vertex and fragment .shader files for day_night, diffuse_lighting, solid_color_lighting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required