Archived

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

texture mapping problem

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

I was also getting a problem like yours.
If you are using X files for objects, just open them in a text editor and change the path of the texture
(the X files must be exported as text format)

ex.
TextureFilename {
"c:\\game\\bolum\\bulut\\sol.jpg";
}
change this to
"\\bolum\\bulut\\sol.jpg";
"bolum" is a directory in a directory named "game"
also your exe must be in "game" directory.



Share this post


Link to post
Share on other sites
I''m not sure that is the problem - the textures loaded fine until I added 5 and 6

if((TextureImage[0]=LoadBMP("Data/CylinderTex.bmp"))&&
(TextureImage[1]=LoadBMP("Data/Floor.bmp"))&&
(TextureImage[2]=LoadBMP("Data/StandTex.bmp"))&&
(TextureImage[3]=LoadBMP("Data/Texture1.bmp"))&&
(TextureImage[4]=LoadBMP("Data/Texture2.bmp"))&&
(TextureImage[5]=LoadBMP("Data/Pen.bmp"))&&
(TextureImage[6]=LoadBMP("Data/Gridfill.bmp")))

Share this post


Link to post
Share on other sites
More than likely it means one of your textures is either not there or not a size that is a power of 2. When you have all of that in the IF statement, any one of them not loading will cause the IF to fail and if you are using the NeHe code your texture generation only happens after the IF passes.

Make sure that those textures actually exist in the Data directory and that they are spelled correctly.

Share this post


Link to post
Share on other sites