Jump to content
  • Advertisement
Sign in to follow this  

Texturing problem

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

Now im using this code to render my bsp: tBSPFace *pFace = &sMBSP.BSPFace[faceIndex]; glBindTexture(GL_TEXTURE_2D, todas_texturas[pFace->textureID]); glBegin( GL_TRIANGLES ); for( int j=0; j < pFace->numMeshVerts; j++) { int offset = sMBSP.BSPMeshVerts[pFace->meshVertIndex+j].pMeshVerts + pFace->vertexIndex; glTexCoord2f(sMBSP.BSPVertex[offset].vTextureCoord.u, sMBSP.BSPVertex[offset].vTextureCoord.v); glVertex3f( sMBSP.BSPVertex[offset].vPosition.x, sMBSP.BSPVertex[offset].vPosition.y, sMBSP.BSPVertex[offset].vPosition.z); } glEnd(); I see the structure of the map (so the vertex are good). But i cant see the textures correctly (they are distorted). When i loaded textures i changeg the v coord to v = v * -1. I tested the textures in other triangles writting it manually and i can see it perfect. I compared the loaded coord with other bsp loaders that works, and the coords are the same. Can i asign textures to textcoord in this code in that way? Me estoy volviendo loco :-). Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • 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!