[vlc-commits] Revert "direct3d9: we don't need a diffuse color"
Steve Lhomme
git at videolan.org
Tue Sep 1 14:08:08 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Sep 1 13:44:51 2020 +0200| [ecd05694f156c1ccea53b0f88c7fc42508ffb9f9] | committer: Steve Lhomme
Revert "direct3d9: we don't need a diffuse color"
This reverts commit 24509495ebb4f39baf8f346362ef62688c27364f.
We do need it for transparency. This is visible in the fading OSD for example.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ecd05694f156c1ccea53b0f88c7fc42508ffb9f9
---
modules/video_output/win32/direct3d9.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 5dd8590b1e..d9d30ab2a1 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -179,9 +179,10 @@ typedef struct
{
FLOAT x,y,z; // vertex untransformed position
FLOAT rhw; // eye distance
+ D3DCOLOR diffuse; // diffuse color
FLOAT tu, tv; // texture relative coordinates
} CUSTOMVERTEX;
-#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW|D3DFVF_TEX1)
+#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1)
typedef struct d3d_region_t {
D3DFORMAT format; // for subpictures
@@ -323,6 +324,7 @@ static void Direct3D9SetupVertices(CUSTOMVERTEX *vertices,
vertices[i].z = 0.0f;
vertices[i].rhw = 1.0f;
+ vertices[i].diffuse = D3DCOLOR_ARGB(alpha, 255, 255, 255);
}
}
More information about the vlc-commits
mailing list