Jump to content
  • Advertisement
Sign in to follow this  
HAJ_SQL

OpenGL Texturing 3ds file

This topic is 4531 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!