Jump to content
  • Advertisement
Sign in to follow this  
raizen

mipmap texturing fastest

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

why code 1: glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST_MIPMAP_NEAREST); code 2: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); why code 1 is faster tha code 2? how can i do the code 2 faster? P.s: with code 1: 76 fps with code 2: 36 fps

Share this post


Link to post
Share on other sites
Advertisement
Mipmapping can run faster when you're sampling the lowest level, because the texture is small enough to fit into texture cache and you get super fast texture lookups. For many scenes, you probably won't get this performance boost though.

Share this post


Link to post
Share on other sites
Quote:
Original post by cwhite
Mipmapping can run faster when you're sampling the lowest level, because the texture is small enough to fit into texture cache and you get super fast texture lookups. For many scenes, you probably won't get this performance boost though.


nah

i load now 20 texture 512x512! and mipmap is faster...

the code 1 (mip mapping) don't work on my notebook, so how can i improve the speed of code 2?

Share this post


Link to post
Share on other sites
Texture filtering rarely is the performance bottleneck in any practical 3d application.

That said, if the hardware doesn't support mipmapping, there's nothing you can do about that specific issue other than purchase new hardware.

If a card does support mipmapping, it always increases performance to use it, at the cost of approximately 1.33 times the memory consumption.

Share this post


Link to post
Share on other sites
If you are useing GL_NEAREST for your texture filtering, and Cannot use mipmapping the only way texture wise to speed it up is the reduce the size of the texture, seeing that the card you are testing this on dose not support Mipmapping, I don't see it running that great with 512x512 textures, as it was promoted to core feature in 1.4, just a thought but you do have some new drivers for it, or is it an older card?

Perhapes you can write some way to control texture quality, if your not useing AutoMippmap generation, then you can just use the diffrent mipmap levels and select your maximum quality from that, or if you are useing Automippmapping, you could write some code to half the size or something for machines that dont support mipmapping.

Most of the time useing a 512x512+ texture with mappmapping, you'll acctually be useing a 256x256 or even a 128x128 size texture because a polygon is usually not takeing up enough screen space for a 512x512 texture area, unless your running at really hi resolution or perhapes useing them for full screen backgrounds or something similar.

other then useing smaller textures which is what mipmapping is all about, I dont see anyway of making #2 faster.

Share this post


Link to post
Share on other sites
Sign in to follow this  

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