Jump to content
  • Advertisement

Archived

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

Grizwald

ARB_Multitexture Performance

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

Hey, I''m using ARB_Multitexture for tile blending in my RTS. It would seem that calling glBindTexture before each "layer" of my textures would be slow, even if my textures were arranged in a tree so they were they were prepared once per frame. How could i go about optimizing ARB_Multitexture, and are those glBindTexture''s a performance hit? Thanks, Grizwald

Share this post


Link to post
Share on other sites
Advertisement
glBindTexture have to be done once in the whole app process. And this can be done in the loading routine. And it shouldn''t be that slow (if you are using C++).

Share this post


Link to post
Share on other sites
dande : What???????? (RTFM)
Grizwald: the only thing you can do is to sort chunks of terrain by textures used and render the ones with the same textures in a batch. then find the nex most simmilar chunk, change required textures and render.... and so on... and, yes glBindTexture is quite a big hit. (as all state chnges)

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
Darkwing is right, and I believe that method is used often. I use the "texture splatting" method for my terrain which does just that. As a pre processing step I find each quad that a certain texture effects and generate tri-strips for that particular "splat". That way the only glBindTexture calls I need to make are when changing splats.

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!