it’s a bit cheating, because there is actually two questions in the title.
on the account of how to import a 3D model i think i can get through that bit.
however, my question is: can i map a texture to the imported model at runtime ?
isn’t this called UV-Mapping ?
the 3D model is basically a sphere, is it better to generate the sphere using OpenGL ES ?
but then how do i map a texture to it ?
Sorry for being ignorant about most of the basics.
Are you using straight OpenGL or an engine? In case you’re using an engine, some of this might already be solved for you.
If you’re using straight OpenGL, you have to keep in mind that it is “merely” a rendering API. So you’ll still have to do a lot of the leg work yourself.
To import a 3D model you’ll have to
And yes, you can texture map your mesh. What you will need to have are texture (UV) coordinates. These basically map the vertices in your mesh to a location on your 2D texture. Imagining a sphere models the earth, the UV coordinates map the vertices to a specific location on the 2D map of the earth.
You can perhaps generate those in code for a 3D sphere, but modeling packages can help you there as well, especially for more complex 3D objects. For somewhat of a visual introduction, have a look at this tutorial on UV mapping related to Blender.
An OpenGL ES tutorial on textures and texture mapping can be found here.