O'Reilly logo

OpenGL ES 3.0 Cookbook by Parminder Singh

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

Applying multiple textures

The multitexturing allows you to apply more than one texture on a given geometry to produce many interesting results; modern graphics allow you to apply multiple textures on to geometry by means of texture units. In this recipe, you will learn how to make use of multiple texture units in order to implement multitexturing.

Getting ready

This recipe is similar to our first recipe, that is, SimpleTexture. The only difference is that we will use more than one texture. Instead of using the 2D plane geometry, we will use a 3D cube. Additionally, there are some changes required in the fragment shader. We will discuss this in the next section.

How to do it...

This section will discuss all the important changes made to support multiple ...

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