Summary

In this chapter, we built a Cardboard Android app from scratch, starting with a new project and adding Java code a little bit at a time. In our first build, we had a stereoscopic view of a triangle that you can see in a Google Cardboard headset.

We then added the model transformation, 3D camera views, perspective and head rotation transformations, and discussed a bit about matrix mathematics. We built a 3D model of a cube, and then created shader programs to use a light source to render the cube with shading. We also animated the cube and added a floor grid. Lastly, we added a feature that highlights the cube when the user is looking at it.

Along the way, we enjoyed good discussions of 3D geometry, OpenGL, shaders, matrix math for 3D perspective ...

Get Cardboard VR Projects for Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.