- If I have 3 polygons with 3 different textures, what will be the fastest way to draw them:
a) Create 3 textures, and then for each frame, bind texture A, draw polygon A, bind texture B, draw polygon B, bind texture C, draw polygon C.
or
b) Create 1 blank texture, bind that texture, and then for each frame, glTexSubImage2D the image you want displayed on polygon 1, draw polygon 1, glTexSubImage2D the image you want displayed on polygon 2, draw polygon 2, glTexSubImage2D the image you want displayed on polygon 3, draw polygon 3.
In method a) there’s a lot of binding going on, but in method b) there’s a lot of copying to texture going on. I would guess that method a) would be faster because in method b), you’re copying data from system memory to video memory, but then again, I don’t know what the cost of binding textures is.
- With modern-day video cards, or even those a couple of years old, is it significantly slower to draw a textured polygon than an untextured polygon? I mean, it may not make any practical difference for 1 polygon, but what if you were drawing thousands of polygons per frame, say 100,000? Then would you start to notice a significant difference in speed?