Jump to content
  • Advertisement

Archived

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

Help Texture Mapping using Nehe's TUT #24

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

Well I adopted nehe''s example in tut #24 for texture mapping .TGA files. I can get it to texture map using the Floor.TGA file but File.TGA does not work. I tried using the File.TGA in textures[0].textID and the base won''t texture map. When I swap "file.TGA" and "Floor.TGA" back, it works but "file.TGA still doesn''t. I''m suspecting something is wrong with my File.TGA but I''m not completely sure. I used 123Graphic Converter to convert the once JPEG into the current TGA file. here is my code http://sourcepost.sytes.net/sourcepost/sourceview.aspx?source_id=1573

Share this post


Link to post
Share on other sites
Advertisement
I was actually having the same problem tonight. I am unsure if you are still having this problem, but I suddenly realised that opengl textures must be in powers of two in size. IE:

2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096.

I know of no card that can currently go higher, but there prolly is. But I realized my picture was 320X320 and that is not a valid texture size. When I resized it to 512X512, walla! The white (invalid) texture started working! So it is probably being loaded, and there is probably nothing wrong with the picture file, but maybe opengl doesnt like it. Makes sure its one of the above sizes and let me know if you are still having problems.

[edited by - trashed on November 17, 2002 10:19:56 AM]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!