I am teaching myself opengl es. I recently figured out how to parse/load a mesh from .OBJ file. I am now trying to apply a texture to it, I know I can only use one set of indices.. other than that I am lost as to the concept and code required to draw a texture onto my cube. A detailed/semi-detailed explanation of what's required, code, and description of what is happening would be soooo much appreciated. I haven't found much for opengl es on this subject and the explanations are a bit vague for me. Please remember I am using opengl es. Thanks in advance. BTW if it helps this is the .OBJ file
enter code here
# Blender v2.62 (sub 0) OBJ File: ''
www.blender.org
mtllib untitled.mtl o Cube_Cube.002 v 1.067472 -0.769912 -1.117719 v 1.067472 -0.769912 0.882281 v -0.932528 -0.769912 0.882281 v -0.932527 -0.769912 -1.117719 v 1.067473 1.230088 -1.117718 v 1.067472 1.230088 0.882282 v -0.932528 1.230088 0.882281 v -0.932528 1.230088 -1.117719 vt 0.951958 0.112804 vt 0.951958 -0.887196 vt -0.048042 -0.887196 vt -0.048042 0.112804 vt 0.058859 0.112804 vt 0.058859 1.112804 vt 1.058859 1.112804 vt 1.058859 0.112804 vt 0.951958 1.112804 vt -0.941141 0.112804 vt -0.941141 -0.887196 vt 0.951958 0.058859 vt -0.048042 0.058859 vt 0.951958 -0.941141 vt 1.951958 -0.941141 vt -0.048042 -0.941141 usemtl Material.001 s off f 5/1 1/2 4/3 f 5/1 4/3 8/4 f 3/5 7/6 8/7 f 3/5 8/7 4/8 f 2/1 6/9 3/4 f 6/1 7/4 3/3 f 1/5 5/6 2/10 f 5/5 6/10 2/11 f 5/12 8/13 6/14 f 8/12 7/14 6/15 f 1/12 2/14 3/16 f 1/12 3/16 4/13
P.S. I understand how to read/parse/understand these aspects of the file. I just need clarification on how I am supposed to use one indexbuffer for the texture and vertices while making only one call to drawelements. Thanks again!