Archived

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

uber_n00b

Miffed by mipmapping

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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);

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites