Graphics Programs Reference
In-Depth Information
Figure 5-6 . Textures from GIMP
Figure 5-7 . GL MULTI TEXTURE application
The two textures used in this application have identical dimensions. For this reason,
the same texture coordinate array is used to fetch texels from both these textures.
As you may have guessed, using two 2D textures with the rendered object does re-
quire two separate sampler2D uniforms. Listing 5-12 contains the vertex-fragment
shader pair from this application.
Listing 5-12. GL MULTI TEXTURE/src/com/apress/android/glmultitexture/
private final String _planeVertexShaderCode =
"attribute vec4 aPosition; \n"
Search WWH ::

Custom Search