From eab3e0af1c50d9aafdb57fbfb269eed631f3ecc1 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 26 Sep 2016 13:56:45 +0000 Subject: Cleanup: stereo windowmanager code This will make the changes in blender2.8 branch simpler --- source/blender/windowmanager/intern/wm_stereo.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'source/blender/windowmanager/intern') diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c index 5576a104123..1c1c2ad35af 100644 --- a/source/blender/windowmanager/intern/wm_stereo.c +++ b/source/blender/windowmanager/intern/wm_stereo.c @@ -168,7 +168,6 @@ static void wm_method_draw_stereo3d_sidebyside(wmWindow *win) wmDrawData *drawdata; wmDrawTriple *triple; float halfx, halfy, ratiox, ratioy; - float alpha = 1.0f; int view; int soffx; bool cross_eyed = (win->stereo3d_format->flag & S3D_SIDEBYSIDE_CROSSEYED) != 0; @@ -187,8 +186,6 @@ static void wm_method_draw_stereo3d_sidebyside(wmWindow *win) soffx = 0; } - glEnable(triple->target); - const int sizex = triple->x; const int sizey = triple->y; @@ -206,9 +203,10 @@ static void wm_method_draw_stereo3d_sidebyside(wmWindow *win) halfy /= triple->y; } + glEnable(triple->target); glBindTexture(triple->target, triple->bind); - glColor4f(1.0f, 1.0f, 1.0f, alpha); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); glBegin(GL_QUADS); glTexCoord2f(halfx, halfy); glVertex2f(soffx, 0); @@ -225,7 +223,6 @@ static void wm_method_draw_stereo3d_sidebyside(wmWindow *win) glBindTexture(triple->target, 0); glDisable(triple->target); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); } } @@ -234,7 +231,6 @@ static void wm_method_draw_stereo3d_topbottom(wmWindow *win) wmDrawData *drawdata; wmDrawTriple *triple; float halfx, halfy, ratiox, ratioy; - float alpha = 1.0f; int view; int soffy; @@ -249,8 +245,6 @@ static void wm_method_draw_stereo3d_topbottom(wmWindow *win) soffy = 0; } - glEnable(triple->target); - const int sizex = triple->x; const int sizey = triple->y; @@ -268,9 +262,10 @@ static void wm_method_draw_stereo3d_topbottom(wmWindow *win) halfy /= triple->y; } + glEnable(triple->target); glBindTexture(triple->target, triple->bind); - glColor4f(1.0f, 1.0f, 1.0f, alpha); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); glBegin(GL_QUADS); glTexCoord2f(halfx, halfy); glVertex2f(0, soffy); @@ -287,7 +282,6 @@ static void wm_method_draw_stereo3d_topbottom(wmWindow *win) glBindTexture(triple->target, 0); glDisable(triple->target); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); } } -- cgit v1.2.3