Sign in to follow this  
jonnys

Code not displaying textures properly

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this