First of all, don't hit me if this is in the wrong topic, but i figured it's a clueless newbie error i'm having :p
Anyway, I'm not very experienced in writing opengl. So the question is how would i go about applying a texture to a Wavefront .obj format model. The rendering part works (reimplemented the code from demo sources).
And yes, I know that ObjReader class doesn't use the "vt" part of the fileformat, but since i need to render only cubes and such for now, i think i'd be able to use the same 8 textcoords every time, right?
So, here's my problem: how do i apply the textures?
I mean if i render an object like this (pseudo code):
gl.glNormal3f( 0.0f, 0.0f, 1.0f);
render first vertex;
render second vertex;
render third vertex;
then everything works and the textures are in place.
How would i achieve the same when using glDrawElements to render the whole array of vertices at once?