• Advertisement
Sign in to follow this  

Whats faster?

This topic is 4432 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 have a question I was wondering which one would be faster. In both
situations we are trying to draw the same wall lets assume its 8by4 units. 1. You bind a new texture for each wall since there will be more then 1 wall for
each house. But each wall is a Quad that repeats the same tile
example: glTexCoord2f(0.0f, 0.0f); glTexCoord2f(8.0f, 4.0f); blah blah blah. 2. You bind just 1 texture which is a tileset for the entire house, but by doing
so each Wall will be actually be a bunch of small panels that make up the whole
wall, depending on the size of the wall we will have that many panels in this case
we will have 8x4 panels which will be 32 Quads for the same wall, but you only
apply the texture once for the entire house and just specify glTexCoord2f for each
section.

Share this post


Link to post
Share on other sites
Advertisement
The second one, since it reduces the number of times you have to do a texture switch. (Coupled, of course, with more efficient drawing methods than glVertex etc.)

Share this post


Link to post
Share on other sites
Texture switches, and other state switches, tend to be slow because the GPU has to finish up stuff it's doing (a 'pipeline flush') before switching over. That's why developers tend to sort their objects by shader and/or texture.

Share this post


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

  • Advertisement