Adding Point Lights

We’re now ready to add some point lights to our scene so we can make our particle fountains glow. We won’t be able to see this too well with a bright backdrop, so the first thing we’ll do is switch over to a night skybox. You can download the night skybox from the website and place it in your project’s /res/drawable-nodpi folder.[63]

To switch to the night skybox, let’s return to ParticlesRenderer and update the assignment to skyboxTexture as follows:

Lighting/src/com/particles/android/ParticlesRenderer.java
 
skyboxTexture = TextureHelper.loadCubeMap(context,
 
new​ ​int​​[]​ { R.drawable.night_left, R.drawable.night_right,
 
R.drawable.night_bottom, R.drawable.night_top,
 
R.drawable.night_front, R.drawable.night_back}); ...

Get OpenGL ES 2 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.