Jump to content
  • Advertisement
Sign in to follow this  
toddhd

OpenGL The white rectangle problem

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

My OpenGL program loads 7 textures. The load texture routine is straight from NeHe's tutorials - in fact, this project started out as Lesson 17 and I just started to build on that. Anyway, 6 of the 7 textures load fine. All the textures were created by hand in PSP 8.10 and saved as *.bmp's. This last bmp is the game logo, the others are game elements. All the images are some power of 2, or however you say it (i.e. 16x16, 16x128, 640x480). Anyway, all the textures load and display except the logo image, which shows up as a big white rectangle. I tried switching other images (i.e. powerups and stuff) in place of the logo, and they show up fine (big and distorted, but fine). By the way, if it makes a difference, everything is in Ortho Mode in this game - it is all 2D. Any suggestions on what could be happening would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
ditto Eps.

640 & 480 are multiples of 2, not powers of 2.

powers of 2 are 2^n, e.g.:

1 2 4 8 16 32 64 128 256 512 1024...etc.

Share this post


Link to post
Share on other sites
<embarrased grin> Yup, that would be a problem...

I changed the logo size to 512x256 and all was well with the world...

Thanks!

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!