I\'m new to OpenGL ES 2.0 with it\'s programmable pipeline and I\'m porting application that renders many objects all with different textures. So this will require calling glDr
Unfortunately, there is not a simple built-in way to apply multiple textures in a single batch glDrawArrays
call. There are, however, ways to make it work. One of the most common strategies is known as a Texture Atlas. Basically, the idea is to combine many images together into one larger texture, with each sub-image occupying a known sub-rectangle of the texture. When you map those onto your primitives, you supply the coordinates of the sub-rectangle corresponding to the image you want to display.
A texture atlas will work in a large number of cases, but can be comparatively complex to set up. If you don't have to do a different texture for every single object, the first thing to try would be to simply batch together as many primitives that use the same texturing as possible.
If you were not using OpenGL ES, you might also look into using Texture Arrays, if your textures are all of the same size.