Jump to content
  • Advertisement

Archived

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

timbuk2

Are there high quality texture map settings?

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

I was wondering if there was a better way of creating textures, I want them to be the same high quality as the original, but the textures which end up on my objects aren''t as clear as the original, even if i make the shape the same dimensions as the original texture. I''m using gluBuild2DMipmaps() and glTexSubImage2D() as the image dimensions I am using aren''t of the form n^2, otherwise I would have used glTexImage2D(). glGenTextures(1, &textureArray[textureID]); glBindTexture(GL_TEXTURE_2D, textureArray[textureID]); gluBuild2DMipmaps(GL_TEXTURE_2D, 4, texImage[textureID].sizeX, texImage[textureID].sizeY, textureType, GL_UNSIGNED_BYTE, texImage[textureID].data); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, texImage[textureID].sizeX, texImage[textureID].sizeY, GL_RGBA, GL_UNSIGNED_BYTE, texImage[textureID].data); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR_MIPMAP_LINEAR); Any help would be gratefully appreciated - Tim

Share this post


Link to post
Share on other sites
Advertisement
Dont use 4 as the second parameter in gluBuild2DMipmaps, use GL_RGBA8 to hint the driver that you want full 32bit colors

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.

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!