Stefan Dösinger wrote:
D3D9 does not have Overlay surfaces like ddraw does, so we need a wined3d-private way to create ddraw overlays. I decided to add a new usage flag outside of the flags defined by Direct3D and use it in wined3d. d3d8 and d3d9 have to filter usage flags which are not valid in d3d8 and d3d9 to prevent broken applications from accidentally passing WINED3DUSAGE_OVERLAY.
D3D9 does not need overlays, because dynamic textures + drawing textured quads can provide simmilar functionality. But it is hard to implement ddraw ovelays using dynamic textures in ddraw.dll in an efficient way, so I decided to implement overlays in the ddraw way in wined3d.
@@ -274,7 +274,7 @@ static HRESULT WINAPI IDirect3DDevice9I
TRACE("(%p) : w(%d) h(%d) fmt(%d) surf@%p\n", This, Width, Height, Format, *ppSurface);
- hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, Format, Lockable, Discard, Level, &object->wineD3DSurface, Type, Usage, (WINED3DPOOL) Pool,MultiSample,MultisampleQuality,pSharedHandle,SURFACE_OPENGL,(IUnknown *)object);
- hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, Format, Lockable, Discard, Level, &object->wineD3DSurface, Type, Usage & WINED3DUSAGE_MASK, (WINED3DPOOL) Pool,MultiSample,MultisampleQuality,pSharedHandle,SURFACE_OPENGL,(IUnknown *)object);
Should we split lines like this? It's doesn't fit even on my 1600x1200 display.
diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index e70a814..278e7d7 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -1053,6 +1053,7 @@ #define WINED3DUSAGE_DYNAMIC #define WINED3DUSAGE_AUTOGENMIPMAP 0x00000400L #define WINED3DUSAGE_DMAP 0x00004000L #define WINED3DUSAGE_MASK 0x00004FFFL +#define WINED3DUSAGE_OVERLAY 0x00010000L
I think it would be safer to make it 0x10000000L instead.
Vitaliy
Hi,
Should we split lines like this? It's doesn't fit even on my 1600x1200 display.
I wanted to do a lot of reformating like this, but AJ put a veto before I even started :-/
diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index e70a814..278e7d7 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -1053,6 +1053,7 @@ #define WINED3DUSAGE_DYNAMIC #define WINED3DUSAGE_AUTOGENMIPMAP 0x00000400L #define WINED3DUSAGE_DMAP 0x00004000L #define WINED3DUSAGE_MASK 0x00004FFFL +#define WINED3DUSAGE_OVERLAY 0x00010000L
I think it would be safer to make it 0x10000000L instead.
Maybe, but this can easilly be changed if we have problems due to new definitions in e.g. d3d10. For now we are safe as we filter out flags which are invalid in d3d8 / d3d9.
On 06/10/06, Stefan Dösinger stefandoesinger@gmx.at wrote:
Hi,
Should we split lines like this? It's doesn't fit even on my 1600x1200 display.
I wanted to do a lot of reformating like this, but AJ put a veto before I even started :-/
If you're changing the line, it should generally be ok to eg. break it up.
Stefan Dösinger wrote:
Should we split lines like this? It's doesn't fit even on my 1600x1200 display.
I wanted to do a lot of reformating like this, but AJ put a veto before I even started :-/
If you change the line anyway you can split it up too. It dosn't add an additional entry to the diff.
bye michael
diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index e70a814..278e7d7 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -1053,6 +1053,7 @@ #define WINED3DUSAGE_DYNAMIC #define WINED3DUSAGE_AUTOGENMIPMAP 0x00000400L #define WINED3DUSAGE_DMAP 0x00004000L #define WINED3DUSAGE_MASK 0x00004FFFL +#define WINED3DUSAGE_OVERLAY 0x00010000L
I think it would be safer to make it 0x10000000L instead.
Maybe, but this can easilly be changed if we have problems due to new definitions in e.g. d3d10. For now we are safe as we filter out flags which are invalid in d3d8 / d3d9.
On Thu, 5 Oct 2006, Vitaliy Margolen wrote: [...]
@@ -274,7 +274,7 @@ static HRESULT WINAPI IDirect3DDevice9I
TRACE("(%p) : w(%d) h(%d) fmt(%d) surf@%p\n", This, Width, Height, Format, *ppSurface);
- hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, Format, Lockable, Discard, Level, &object->wineD3DSurface, Type, Usage, (WINED3DPOOL) Pool,MultiSample,MultisampleQuality,pSharedHandle,SURFACE_OPENGL,(IUnknown *)object);
- hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, Format, Lockable, Discard, Level, &object->wineD3DSurface, Type, Usage & WINED3DUSAGE_MASK, (WINED3DPOOL) Pool,MultiSample,MultisampleQuality,pSharedHandle,SURFACE_OPENGL,(IUnknown *)object);
Should we split lines like this? It's doesn't fit even on my 1600x1200 display.
I too have noticed that the Direct3D code has a lot of very very long lines. There are two issues with this: * ugly line wraps, especially for people using laptops where low resolutions tend to still be the norm * it makes it harder to see what changed in a line when you have to scan through 200 characters
With the ban on gratuitous reformating existing code will have to remain as is. But for new code, sticking to 80 character lines would be nice. That's nothing more than my 0.02 cents, of course.