Miffed by mipmapping

Started by
3 comments, last by uber_n00b 20 years, 8 months ago
Ok I have this program that takes in about 100k polygons and then displays them in a terrain-ish looking thing. The terrain textures are mipmapped, but when the textures very close to the camera are displayed, they seem to be the quality of texture that would be displayed much further away and may appear very pixelated randomly. This only happens with some of them and the rest are smooth. Is there a problem? I do not give OpenGL the calculated normals when I draw the polygons, should I? My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
Advertisement
What minification and magnification filters are you using?
none im using the gluBuild2DMipmaps() function only when building textures. The other two statements I have however are:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
Won''t you still have to set the texture filters anyway?

Try adding these lines of code:

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);


Hope this helps..
Oh man I used to have those lines of code but they aren't there for some reason now. I'll give it a try and edit this post

--
Ok I tried it out and it works like a charm. Check out the results at http://www.geocities.com/vsage3/aug1003.bmp (for some reason a hyperlink to it wont let the page be viewed =\. Needless to say I'm pleased. It would have looked all pixelated before. Thanks for all your help guys

[edited by - uber_n00b on August 11, 2003 6:10:16 PM]
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.

This topic is closed to new replies.

Advertisement