The more I think about it, your index data may in fact be to blame here.
First, GL_UNSIGNED_INT
is a terrible choice for vertex array element index. You rarely need 4.2 billion vertices, GL_UNSIGNED_SHORT
(up to 65536 vertices) is the preferred index type - especially on embedded devices. GL_UNSIGNED_BYTE
may be tempting for meshes with fewer than 256 vertices, but most hardware cannot natively support 8-bit indices so you just put more work on the driver.
Now onto what might actually be causing this problem:
You are using mesh>groupMesh[i].indexDataSize*4
for the number of vertices to draw. This will overrun your index array and indexDataSize*3
-many vertices will be invalid. As weird as it sounds, since 3/4 of your drawn vertices invoke undefined behavior, this could be the cause of your texturing issues.