Jump to content
  • Advertisement
Sign in to follow this  
Chire

bmp texture load + new nvidia driver = wtf

This topic is 3887 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, my problem is very simple. i upgraded today to the latest nvidia driver available on www.nvidia.com but i have a problem... the nehe, and morrowland tutorials,(for example the texture tutorials ( tuts number 06 and 07 )) just dont work, i see weird colors instead of the correct texture. i dont post image because is as simple as that.? with the previus driver all worked perfectly. I have a geforce fx5900 128mb pd: i also lost control over my framerate, it goes up to 250fps. anyone know how to solve that texture problem???

Share this post


Link to post
Share on other sites
Advertisement
What about other demoes like the ones from nvidia or any other site?

He is calling
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);

so maybe it is not 4 byte aligned.
You may need to insert a glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

In fact, the code is ancient. It should be

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!