Jump to content
  • Advertisement


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

pIpEs ClaNGoR

texture crash

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

when I load some bmps with gluBuild2DMipmaps() my program will crash and some bmps will load fine. I thought gluBuild2DMipmaps() would load any bmp and resize it. --------------------------- The pipes clangor all the time.

Share this post

Link to post
Share on other sites
gluBuild2DMipamps() will load any bmp and resize it. But:
1. Your data must be valid
2. Check the width and height params you are passing to gluBuild2DMipmaps. If width*height*components is greater than the size of the allocated buffer, it will crash.
3. set
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
brefore scaling.
EDIT: You can set it to the default value (4) after scaling. When I didnt set it to 1, the image wasnt scaled correctly.
Hope this will help


Times change...

Excuse my poor english!

[edited by - PM on May 3, 2003 4:36:02 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!