Sign in to follow this  

Crappy textures

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

Well, I just can't get my damn textures to load correctly :X Click for screenshot As you can see, M$ crap paint shows it a little better... Any ideas? glGenTextures(1, &this->texture); glBindTexture(GL_TEXTURE_2D, this->texture); glTexImage2D(GL_TEXTURE_2D, 0, 4, bmp_width, bmp_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

Share this post


Link to post
Share on other sites
For one you aren't using mipmapping, two change the internal format to GL_RGBA8. So check into mipmapping. BTW what are the texture dimensions? POT is needed on older hardware if you are not going to use gluBuild2DMipmaps() or resize them yourself and load them as a POT. Unless you have a new GL2.0 compliant card you can use NPOT textures.

HTH

Share this post


Link to post
Share on other sites
It also seems very stretched which is going to distort it. When you're texturing you want the polygon to have the same relative dimensions of the texture itself so there is no stretching. From your screenshot it appears that the poly to which you have it mapped is too long along the vertical axis.

-me

Share this post


Link to post
Share on other sites
Quote:
Original post by Palidine
It also seems very stretched which is going to distort it. When you're texturing you want the polygon to have the same relative dimensions of the texture itself so there is no stretching. From your screenshot it appears that the poly to which you have it mapped is too long along the vertical axis.

-me


Same problem with same size also.


And MARS_999, I have tried to use gluBuild2DMipmaps(), but it didn't work. I'll check what this GL_RGBA8 does though.

Edit: It seems to be something wrong with my hardware, works for a friend:
http://mitglied.lycos.de/warriorsofhonour/screenzo.PNG

[Edited by - D-Slicer on December 16, 2006 9:08:23 AM]

Share this post


Link to post
Share on other sites

This topic is 4011 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.

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