Sign in to follow this  
trementes

Lesson 10 HELP me

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this