texture mapping problem
I added two objects to my scene and all of a sudden all the texture mapped objects are white - how do I sort this problem?
cheers
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.
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.
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")))
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")))
is ur array at least 7 big?
life is unfair, take advantage of it.
UNMB2 - if the link doesn''t work, try clicking it
life is unfair, take advantage of it.
UNMB2 - if the link doesn''t work, try clicking it
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.
Make sure that those textures actually exist in the Data directory and that they are spelled correctly.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement