O'Reilly logo

OpenGL ES 2 for Android by Kevin Brothaler

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

Creating a Skybox

A skybox is a way of representing a 3D panorama that can be seen in every direction, no matter which way you turn your head. One of the most classic ways of rendering a skybox is to use a cube surrounding the viewer, with a detailed texture on each face of the cube; this is also known as a cube map. When we draw the skybox, we just need to make sure that it appears behind everything else in the scene.

When we use a skybox, we use a cube to represent the sky, so normally we’d expect the sky to look like a giant cube, with highly visible joints between each face. However, there’s a trick that makes the edges of the cube disappear: each face of the cube is a picture taken with a 90-degree field of view and a planar projection, ...

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