Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2016-09-26 16:56:45 +0300
committerDalai Felinto <dfelinto@gmail.com>2016-09-26 16:56:45 +0300
commiteab3e0af1c50d9aafdb57fbfb269eed631f3ecc1 (patch)
tree293182a3de738c43d8ba8d05cff05b346f1a4d43 /source/blender/windowmanager/intern
parent7c532601090c6e5a09484a0f8a39467856a8d6f4 (diff)
Cleanup: stereo windowmanager code
This will make the changes in blender2.8 branch simpler
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_stereo.c14
1 files changed, 4 insertions, 10 deletions
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);
}
}