• Advertisement
Sign in to follow this  

Lesson 10 HELP me

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

Hi there.. Sorry for disturbing you. I have some question with lesson 10. First.. I want to load a jpg file which will be use for ground texture. In your tutorial, you use bmp format. When I change it with mine (jpg file), it occurs error. Second.. Because the jpg doesn't work, I edited my jpg file into bmp file via photoshop. it works, but the result doesn't give me the same picture with my bmp. It gives me white, it have to be grey(tar's colour). please check it out. Help me. thx u. Link to the picture http://www.mediafire.com/file/zmnonmhtmoj/ground_texture.bmp NB: I only change this part only if (TextureImage[0]=LoadBMP("Data/ground_texture.bmp")) <--- this part. and for the world.txt I deleted all except this. Because I need the floor. NUMPOLLIES 36 // Floor 1 -3.0 0.0 -3.0 0.0 6.0 -3.0 0.0 3.0 0.0 0.0 3.0 0.0 3.0 6.0 0.0 -3.0 0.0 -3.0 0.0 6.0 3.0 0.0 -3.0 6.0 6.0 3.0 0.0 3.0 6.0 0.0

Share this post


Link to post
Share on other sites
Advertisement
Hey,

well loading jpg files needs much more effort and usually you'd use libjpeg for that. So either dig into that or stay with BMP files [wink]. Lesson 24 is about loading TGA files which can be at least RLE-compressed if you wanted jpeg because of it's size.

And for the world file, if you remove all the other faces you should set NUMPOLLIES to 2.
But.. you must have changed something else in the code, I just downloaded the lesson, saved your image as mud.bmp and edited world.txt and it works fine. I get the textured floor...

Share this post


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

  • Advertisement