Whats faster?

Started by
3 comments, last by Drew_Benton 18 years, 3 months ago
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.
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.)
dang :-( I was hoping the first one would be faster.
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.
Quote:Original post by TempHolder
dang :-( I was hoping the first one would be faster.


Well if you wanted to do option 2, I have a post on that [wink]

This topic is closed to new replies.

Advertisement