Jump to content
  • Advertisement
Sign in to follow this  
glmisscelan

Texturing problem

This topic is 4808 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. 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
So exactly what do you mean by "dont see the textures correctly"? Are they distorted? Or maybe not visible at all?

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!