Texturing 3ds file

Started by
4 comments, last by cwhite 17 years, 11 months ago
Hi guys I need to know how to texture a 3ds file I have imported to OpenGL is there an easy way to do it?
Advertisement
any help is greatly appreciated
The texture coordinates are specified in the 3ds model file. Just read them in the same way you read in the rest of the data in the 3ds file and then create your texture coordinate array to send to the card with your vertex array.
hello cwhite

this is how import the models

importMeshFrom3ds(myMesh6, "meshes\\plant.3ds");

and this is the class

void importMeshFrom3ds(CGPolyMesh *m, char *filename)
{
int N=0, n=0;
CGVector3D *V=nil;
CGFaceVertex *Fv=nil;

import3ds(filename, &N, &n, &V, &Fv);
defineMesh(m, N, n, V, Fv, nil);

}

so could you please tell me how do I do it using the above code


actually coz am a beginner in both c++ and opneGL
any help is greatly appreciated

I need this by tomorrow guys and am so stuck
That code doesn't tell me anything. What are the members of CGFaceVertex? Does it have normals and texture coordinates in it? If not, then you're screwed. If so, then just use interleaved vertex arrays and everything will work.

In any event, I don't know what's going on Tuesday, but you probably bit off more than you can chew. Start small and build up. Rome wasn't built in a day.

This topic is closed to new replies.

Advertisement