Sign in to follow this  
HAJ_SQL

OpenGL Texturing 3ds file

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this