G'day,
[...] I've allways had the idea that the screen tearing had something to do with storing a 640*480 screen onto a 1024*768 or other size desktop without addapting line width and height pointers resulting in an interleaved display.
I could certainly imagine a mistake such as you describe causing something that looks like the screen tearing!
Another potential cause is all the bytes used to store the screen's contents not being contiguous, and the code not adapting to that. For example, on my nVidia 6200, with screen width 1680 and with 32 bits (4 bytes) per pixel, each screen row requires 1680*4 = 6720 bytes of storage, but DirectX reports the "pitch" of the surface to be 7168.
Microsoft's web site says the extra bytes are "cache", but since 7168 = 1024 * 7 I'm guessing that DirectX is aligning each screen row on a 1 kilobyte boundaries for performance reasons. EAW certainly has some code which assumes that the pitch is equal to the size in bytes of a row, and I'm assuming that code might be used in cases where it is not appropriate and is actually the cause of the issues we're seeing. I'd like to see if I can verify this assumption by finding out if someone who is experiencing this problem actually has DirectX reporting a pitch value that doesn't meet the code's expectations, hence
this post.
The fact that the EAW menus now have a width of 1024 is probably preventing
me from seeing screen tearing, but perhaps newer/better video cards have drivers which request alignment to larger boundaries. (I'm just assuming here that the driver tells DirectX what alignment it prefers)
[Edit: Also, I note that the "registry hack" iron mike refers to in the post immediately above this refers to a "NoAdjusted
Pitch" setting for the driver]
Regards,
David