Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

GAmEtuT.. 3ds+texture=trouble

This topic is 5304 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

Hallo guys, i need help with gametut.. 3ds loader i cant load material for more that one model !!! and i dont get why ! what the hell i did wrond again ???? ////////////////////////////////////////////////////////////// //// my texture loader void TexModel(t3DModel pModel, int i) { static int ct; for(int jods = 0; jods < pModel.numOfMaterials; jods++) { if(strlen(pModel.pMaterials[jods].strFile) > 0) { CreateTexture(ds_Texture, pModel.pMaterials[jods].strFile, jods+ct); } pModel.pMaterials[jods].texureId = jods+ct; if(strlen(pModel.pMaterials[jods].strFile) > 0) { ct++; } } } //////////////////////////////////////////////////////// ///////Add Texture//////////////////////////////////// if(pObject->bHasTexture) { glEnable(GL_TEXTURE_2D); //glColor3ub(255, 255, 255); if(result!=5){glBindTexture(GL_TEXTURE_2D, ds_Texture[(pModel.pMaterials[pObject->materialID].texureId)]);} } else { glDisable(GL_TEXTURE_2D); //glColor3ub(255, 255, 255); } //////////////////////////////////////////////////////// aug_h_Load3ds.Import3DS(&aug_h_model, "models/w_aug.3ds"); TexModel(aug_h_model, 0); pl_model_Load3ds.Import3DS(&pl_model, "models/terrorx.3ds"); TexModel(pl_model, 0); [edited by - Wickeeed on November 12, 2003 7:54:07 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!