Jump to content
  • Advertisement
Sign in to follow this  
jonnys

Code not displaying textures properly

This topic is 4486 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 engine code is not displaying textures higher than 256x256 pixels properly. It just draws the model in blue. What could be the problem? and how could i fix it?

Share this post


Link to post
Share on other sites
Advertisement
Graphics cards have upper limits to texture sizes, older ones can have quite constricting ones. If you must use 512x512 or larger, try splitting it into 4 256^2 textures, see if that works. According to MSDN, glTexImage2D returns GL_INVALID_VALUE if the size is wrong. But it could also be returned if some of the other parameters are wrong. Test the return value anyway, see if that helps.

Share this post


Link to post
Share on other sites
It is not my graphics card because in another engine it displays the model with the perfect texture(skin). That's why i think it is a problem in my code.
Thanks anyway

Share this post


Link to post
Share on other sites
Quote:
Original post by jonnys
It is not my graphics card because in another engine it displays the model with the perfect texture(skin). That's why i think it is a problem in my code.
Thanks anyway
You can be positive it's not your graphics card by finding out what the max texture size is for it. You can check on Delphi3D.net's Hardware Registry, with the OpenGL Extensions Viewer, by checking with glGet* in your own app, or by telling us what card you have.

If it's a problem with your code, we will need to see said code to notice any problems. Post the relevant parts that you think might contain the problem. And use the source tags. Check the Forum FAQ for more info.

[Edited by - Kalidor on June 9, 2006 2:54:24 PM]

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!