[vlc-devel] [PATCH] direct3d9: fix orientation
Salah-Eddin Shaban
salah at videolan.org
Thu Nov 2 13:28:18 CET 2017
refs #11778, #18368
---
modules/video_output/win32/direct3d9.c | 38 +++++++++++++++++-----------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index c645b91..642ed41 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1467,48 +1467,48 @@ static void Direct3D9DestroyShaders(vout_display_t *vd)
static void orientationVertexOrder(video_orientation_t orientation, int vertex_order[static 4])
{
switch (orientation) {
- case ORIENT_ROTATED_90:
- vertex_order[0] = 1;
- vertex_order[1] = 2;
- vertex_order[2] = 3;
- vertex_order[3] = 0;
- break;
- case ORIENT_ROTATED_270:
+ case ORIENT_ROTATED_90: /* ORIENT_RIGHT_TOP */
vertex_order[0] = 3;
vertex_order[1] = 0;
vertex_order[2] = 1;
vertex_order[3] = 2;
break;
- case ORIENT_ROTATED_180:
+ case ORIENT_ROTATED_270: /* ORIENT_LEFT_BOTTOM */
+ vertex_order[0] = 1;
+ vertex_order[1] = 2;
+ vertex_order[2] = 3;
+ vertex_order[3] = 0;
+ break;
+ case ORIENT_ROTATED_180: /* ORIENT_BOTTOM_RIGHT */
vertex_order[0] = 2;
vertex_order[1] = 3;
vertex_order[2] = 0;
vertex_order[3] = 1;
break;
- case ORIENT_TRANSPOSED:
+ case ORIENT_TRANSPOSED: /* ORIENT_LEFT_TOP */
vertex_order[0] = 0;
vertex_order[1] = 3;
vertex_order[2] = 2;
vertex_order[3] = 1;
break;
- case ORIENT_HFLIPPED:
- vertex_order[0] = 3;
- vertex_order[1] = 2;
- vertex_order[2] = 1;
- vertex_order[3] = 0;
- break;
- case ORIENT_VFLIPPED:
+ case ORIENT_HFLIPPED: /* ORIENT_TOP_RIGHT */
vertex_order[0] = 1;
vertex_order[1] = 0;
vertex_order[2] = 3;
vertex_order[3] = 2;
break;
- case ORIENT_ANTI_TRANSPOSED: /* transpose + vflip */
- vertex_order[0] = 1;
+ case ORIENT_VFLIPPED: /* ORIENT_BOTTOM_LEFT */
+ vertex_order[0] = 3;
vertex_order[1] = 2;
- vertex_order[2] = 3;
+ vertex_order[2] = 1;
vertex_order[3] = 0;
break;
+ case ORIENT_ANTI_TRANSPOSED: /* ORIENT_RIGHT_BOTTOM */
+ vertex_order[0] = 2;
+ vertex_order[1] = 1;
+ vertex_order[2] = 0;
+ vertex_order[3] = 3;
+ break;
default:
vertex_order[0] = 0;
vertex_order[1] = 1;
--
2.6.6
More information about the vlc-devel
mailing list