texture overlaps

If you’ve got an nxn grid of texture squares to cover your area, and your triangle primitive covers two of them, what do you do? Do you need to divide your triangle into two quads and draw them separately with different texture squares loaded?

Yeah, something like that, except that a triangle is broken into a quad and a triangle. You might be also able to pull this off with multitexture, but a better idea is to avoud such cases altogether.

You can do this either by aligning and presplitting your geometry, or making the texture squares overlap a little so you can always pick a texture that fills the entire polygon.

-Ilkka