Jump to content
  • Advertisement

Archived

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

ogl

texture mapping problem

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

Share this post


Link to post
Share on other sites
Advertisement
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
is ur array at least 7 big?

life is unfair, take advantage of it.
UNMB2 - if the link doesn''t work, try clicking it

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
it doesn''t seem to be any of the above causes -any other suggestions?

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.

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!