[vlc-devel] [PATCH] direct3d11: fix the horizontally flipped texture
Rémi Denis-Courmont
remi at remlab.net
Tue Dec 6 18:01:19 CET 2016
On December 6, 2016 5:12:47 AM EST, Steve Lhomme <robux4 at videolabs.io> wrote:
>Now the projection matrices correspond to the one from OpenGL and
>DirectXMath.
>---
> modules/video_output/win32/direct3d11.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
>diff --git a/modules/video_output/win32/direct3d11.c
>b/modules/video_output/win32/direct3d11.c
>index 29702a1..6a5cc45 100644
>--- a/modules/video_output/win32/direct3d11.c
>+++ b/modules/video_output/win32/direct3d11.c
>@@ -828,7 +828,7 @@ static void getProjectionMatrix(float sar, float
>fovy, FLOAT matrix[static 16])
> const FLOAT m[] = {
> f / sar, 0.f, 0.f, 0.f,
> 0.f, f, 0.f, 0.f,
>- 0.f, 0.f, -(zNear + zFar) / (zNear - zFar), 1.f,
>+ 0.f, 0.f, (zNear + zFar) / (zNear - zFar), -1.f,
> 0.f, 0.f, (2 * zNear * zFar) / (zNear - zFar), 0.f};
>
> memcpy(matrix, m, sizeof(m));
>@@ -1852,12 +1852,12 @@ static void SetupQuadSphere(d3d_vertex_t
>*dst_data, WORD *triangle_pos)
> unsigned off = (lat * nbLatBands + lon) * 3 * 2;
>
> triangle_pos[off] = first;
>- triangle_pos[off + 1] = second;
>- triangle_pos[off + 2] = first + 1;
>+ triangle_pos[off + 1] = first + 1;
>+ triangle_pos[off + 2] = second;
>
> triangle_pos[off + 3] = second;
>- triangle_pos[off + 4] = second + 1;
>- triangle_pos[off + 5] = first + 1;
>+ triangle_pos[off + 4] = first + 1;
>+ triangle_pos[off + 5] = second + 1;
> }
> }
> }
>--
>2.10.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
Rejected
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list