Sorry about the last patch, I slipped up on my bitwise operators. This should be correct to my intentions at least!
(I forgot to hit reply all, agh, i should probably power off my computer now :P )
On 3/31/07, Chris Bandy cbandy@jbandy.com wrote:
Stefan Dösinger wrote:
@@ -3194,6 +3193,7 @@ static HRESULT WINAPI
IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
} else { /* No oversize, gl rect is the full texture size */ This->Flags &= ~SFLAG_OVERSIZE;
This->Flags &= SFLAG_NONPOW2;
This is not correct. This removes every flag except SFLAG_NONPOW2. If you want to remove the SFLAG_NONPOW2 flag you have to invert the flag:
This->Flags &= ~SFLAG_NONPOW2
If you want to set the SFLAG_NONPOW2 flag...
This->Flags |= SFLAG_NONPOW2
-- Nathan
Am Samstag 31 März 2007 11:56 schrieb Nathan Williams:
This->Flags |= SFLAG_NONPOW2
This also isn't correct in that case :-)
This will set the NONPOW2 flag unconditionally, even for surfaces which have power of 2 sizes. If there is a surface which has non power of 2 sizes, and the non power of 2 extension is not supported, then the bug is in CreateSurface itself.
If gl native np2 surfaces are supported, then NONPOW2 is never set. The name of this flag is maybe a bit misleading. Essentially it means that the opengl texture is bigger than the surface in memory.
Hmm, ok it seems I'm going to have to put some more time and thought into this patch before I try again!
Thanks for all your help, I'll see what I can work out. Do you know of any games that create power of 2 surfaces, so any changes I make, I can test them against?
Or should I just fire up windows, and brush up on my direct draw code to make a test app? =D
On 3/31/07, Stefan Dösinger stefandoesinger@gmx.at wrote:
Am Samstag 31 März 2007 11:56 schrieb Nathan Williams:
This->Flags |= SFLAG_NONPOW2
This also isn't correct in that case :-)
This will set the NONPOW2 flag unconditionally, even for surfaces which have power of 2 sizes. If there is a surface which has non power of 2 sizes, and the non power of 2 extension is not supported, then the bug is in CreateSurface itself.
If gl native np2 surfaces are supported, then NONPOW2 is never set. The name of this flag is maybe a bit misleading. Essentially it means that the opengl texture is bigger than the surface in memory.
Am Samstag 31 März 2007 13:05 schrieb Nathan Williams:
Hmm, ok it seems I'm going to have to put some more time and thought into this patch before I try again!
Thanks for all your help, I'll see what I can work out. Do you know of any games that create power of 2 surfaces, so any changes I make, I can test them against?
Swat3 was the game I wrote the glrect oversize code for.
Or should I just fire up windows, and brush up on my direct draw code to make a test app? =D
That is always a good idea, especially if you add the test app to dlls/ddraw/tests/